To build the sample CICS transaction, amqscic0.ccs, run the following command:
$ export USERLIB="-lmqm_r" $ cicstcl -l C amqscic0.ccs
An XA switch module is provided to enable you to link CICS with WebSphere
MQ:
Table 23. Essential Code for CICS applications (HP-UX)
Description | C (source) | C (exec) |
---|---|---|
XA initialization routine | amqzscix.c | amqzsc |
You can find more information about supporting CICS transactions in the WebSphere MQ System Administration Guide.
WebSphere MQ on UNIX systems supports CICS on Open Systems via the XA interface.
It is very important to ensure that CICS COBOL applications are linked to the threaded version of the library. CICS on Open Systems WebSphere MQ transactions must link with libmqm_r, except on Solaris, where you must link with lmqmcs_d.
Sample C source for a CICS WebSphere MQ transaction is provided by AMQSCIC0.CCS. The transaction reads messages from the transmission queue SYSTEM.SAMPLE.CICS.WORKQUEUE on the default queue manager and places them onto the local queue whose name is contained in the transmission header of the message. Any failures will be sent to the queue SYSTEM.SAMPLE.CICS.DLQ. The sample MQSC script AMQSCIC0.TST may be used to create these queues and sample input queues.
To use Micro Focus COBOL, follow these steps:
cicsmkcobol -L/usr/lib/dce -L/usr/mqm/lib \ /usr/mqm/lib/ libmqmcbrt.o -lmqm_r
This creates the Micro Focus COBOL language method file and enables the CICS run-time COBOL library to call WebSphere MQ on UNIX systems.
COBCPY=/usr/mqm/inc export COBCPY LDFLAGS="-L/usr/mqm/lib -lmqm_r" export LDFLAGS
cicstcl -l COBOL -e <yourprog>.ccp