Do the following:
A current list of levels of Sybase supported by WebSphere MQ is provided at:
http://www.ibm.com/software/ts/mqseries/platforms/supported.html
Ensure that your Sybase environment variables are set for queue manager processes as well as in your application processes. In particular, always set the following environment variables before starting the queue manager:
export SYBASE=/sybaseOn Windows(R) systems, use:
set SYBASE=c:\sybase
export SYBASE_OCS=OCS-12_0On Windows systems, use:
set SYBASE_OCS=OCS-12_0
Within the Sybase XA configuration file ($SYBASE/$SYBASE_OCS/xa_config), define a Logical Resource Manager (LRM) for each connection to the Sybase server that is being updated.
An example of the contents of $SYBASE/$SYBASE_OCS/xa_config is shown in Figure 14.
# The first line must always be a comment [xa] LRM=lrmname server=servername
The easiest way to create the Sybase switch load file is to use the sample files supplied with WebSphere MQ.
On Windows systems, you can find xaswit.mak in the directory C:\Program Files\IBM\WebSphere MQ\tools\c\samples\xatm. To create the Sybase switch load file with Microsoft Visual C++, use:
nmake /f xaswit.mak sybswit.dllThe generated switch file is placed in c:\Program Files\IBM\WebSphere MQ\exits.
On AIX(R), you can find xaswit.mak in the directory /usr/mqm/samp/xatm; on other UNIX systems, you can find it in the directory /opt/mqm/samp/xatm.
Edit xaswit.mak to uncomment the lines appropriate to the version of Sybase you are using. Then execute the makefile using the command:
make -f xaswit.mak sybswit
The generated 32-bit switch load file is placed in /var/mqm/exits.
The generated 64-bit switch load file is placed in /var/mqm/exits64.
The next step is to modify the configuration information for the queue manager, as described in Adding configuration information to the queue manager, to declare Sybase as a participant in global units of work.
Figure 15 shows a UNIX sample, which uses the database associated with the lrmname LRM definition in the Sybase XA configuration file, $SYBASE/$SYBASE_OCS/xa_config. Include a log file name if you want XA function calls to be logged:
XAResourceManager: Name=mysybase SwitchFile=sybswit XAOpenString=-Uuser -Ppassword -Nlrmname -L/tmp/sybase.log -Txa ThreadOfControl=THREAD
If you are using multi-threaded programs with WebSphere MQ global units of work incorporating updates to Sybase, you must use the value THREAD for the ThreadOfControl parameter as shown in Figure 15.
Also ensure that you link your program (and the switch load file) with the threadsafe Sybase libraries (the _r versions).
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
sycon |