Preparing CICS programs
XA switch modules are provided to enable you to link CICS with WebSphere MQ:
Table 27. Essential Code for CICS applications (Solaris)
Description C (source) C (exec) - add one of the
following to your XAD.StanzaXA initialization routine
amqzscix.c
amqzsc - TXSeries for Solaris
Always link your transactions with the thread safe WebSphere MQ library libmqm_so.
You can find more information about supporting CICS transactions in WebSphere MQ System Administration Guide.
CICS on Open Systems support
WebSphere MQ on UNIX systems supports CICS on Open Systems via the XA interface.
You must 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 link with lmqmcs_d.
Preparing CICS COBOL programs using Micro Focus COBOL
To use Micro Focus COBOL, follow these steps:
- Add the WebSphere MQ COBOL run-time library module to the run-time library using the following command:
cicsmkcobol /opt/mqm/lib/libmqmcbrt.o -lmqmcs_d
This creates the Micro Focus COBOL language method file and enables the CICS run-time COBOL library to call WebSphere MQ on UNIX systems.
- Note:
- cicsmkcobol must be run only when one of the following is installed:
- New version or release of Micro Focus COBOL
- New version or release of TXSeries for Solaris
- New version or release of any supported database product (for COBOL transactions only)
- TXSeries for Solaris
- Export the following environment variables:
COBCPY=/opt/mqm/inc export COBCPY LDFLAGS="-L/usr/mqm/lib -lmqmcs_d" export LDFLAGS- Translate, compile, and link the program by typing:
cicstcl -l COBOL -e <yourprog>.ccp
Preparing CICS C programs
You build CICS C programs using the standard CICS facilities:
- Export one of the following environment variables:
- LDFLAGS = "-L/opt/mqm/lib -L/opt/cics/lib -lmqmcs_d -lmqm -lmqmzse -lsocket -lnsl -ldl"
- Translate, compile, and link the program by typing:
cicstcl -l C amqscic0.ccs
CICS C sample transaction
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 are 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.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.