Home

 

Building libraries for use with CICS

 

Pre-built switch load files are supplied with WebSphere MQ. These are shared libraries (DLLs on Windows) for use with CICS programs in which you require 2-phase commit using the XA protocol. The names of these pre-built libraries are in the table Essential code for CICS applications: XA initialization routine. Sample source code is also supplied in the following directories:

Platform Directory Source file
AIX /usr/mqm/samp/ amqzscix.c
Other UNIX platforms /opt/mqm/samp/ amqzscix.c
Windows c:\\IBM\Websphere MQ\Tools\c\Samples amqzscin.c
To build the switch load file from the sample source, follow the appropriate instructions for your platform:

AIX

Issue the following command:
xlC_r4 /usr/mqm/samp/amqzscix.c -I/usr/lpp/encina/include   -e amqzscix -o amqzsc 
    /usr/lpp/cics/lib/regxa_swxa.o   -L/usr/lpp/cics/lib -L/usr/lpp/encina/lib 
    -lmqmcics_r -lmqmxa_r   -lmqm_r -lcicsrt -lEncina -lEncServer -ldce

Solaris

Issue the following command:
/opt/SUNWspro/bin/cc -s -l/opt/encina/include amqzscix.c -G -o amqzscix  -e 
    CICS_XA_Init -L/opt/encina/lib -L/opt/dcelocal/lib /opt/cics/lib/reqxa_swxa.o 
    -lmqmcics -lmqmxa -lmqm -lmqmcs_d -lmqmzse -lcicsrt -lEncina -lEncSfs -ldce 

HP-UX

Issue the following command:
cc -c -s -I/opt/encina/include /opt/mqm/samp/amqzscix.c -Aa +z -o  amqzscix.o ld -b 
    -o amqzscix amqzscix.o /opt/cics/lib/regxa_swxa.o +e CICS_XA_Init \ 
    -L/opt/encina/lib -L/opt/cics/lib -lmqmxa_r -lmqm_r -ldbm -lc -lm

Windows

Follow these steps:

  1. Use the cl command to build amqzscin.obj by compiling using at least the following:
    cl.exe -c -IEncinaPath\include -IWebSphereMQPath\include -Gz -LD amqzscin.c

  2. Create a module definition file named mqmc1415.def containing the following lines:
    LIBRARY MQMC4SWI 
    EXPORTS 
    CICS_XA_Init 

  3. Use the lib command to build an export file and an import library using at least the following:
    lib -def:mqmc4swi.def -out:mqmc4swi.lib
    If the lib command is successful then an mqmc4swi.exp will also have been built.

  4. Use the link command to build mqmc4swi.dll by linking using at least the following:
    link.exe -dll -nod -out:mqmc4swi.dll 
        amqzscin.obj CicsPath\lib\regxa_swxa.obj 
        mqmc4swi.exp mqmcics4.lib
       CicsPath\lib\libcicsrt.lib
       DcePath\lib\libdce.lib DcePath\lib\pthreads.lib
       EncinaPath\lib\libEncina.lib
       EncinaPath\lib\libEncServer.lib 
       msvcrt.lib kernel32.lib

 

Parent topic:

General XA support


fa13951_


 

Home