TXSeries CICS support
IBM MQ for Solaris supports TXSeries® CICS® using the XA interface.
Write IBM MQ programs that are loaded into the same CICS region in either C or COBOL. We cannot make a combination of C and COBOL MQI calls into the same CICS region. Most MQI calls in the second language used fail with a reason code of MQRC_HOBJ_ERROR.
Preparing CICS COBOL programs using Micro Focus COBOL
MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
To use Micro Focus COBOL, follow these steps:
- Add the IBM MQ COBOL runtime library module to the runtime library using the following command:
cicsmkcobol -L/usr/lib/dce -L MQ_INSTALLATION_PATH/lib \ MQ_INSTALLATION_PATH/lib/libmqmcbrt.o -lmqeNote: With cicsmkcobol, IBM MQ does not allow you to make MQI calls in the C programming language from your COBOL application.If your existing applications have any such calls, move these functions from the COBOL applications to your own library, for example, myMQ.so. After moving these functions do not include the IBM MQ library libmqmcbrt.o when building the COBOL application for CICS.
Additionally, if your COBOL application does not make any COBOL MQI call, do not link libmqmz_r with cicsmkcobol.
This creates the Micro Focus COBOL language method file and enables the CICS runtime COBOL library to call IBM MQ on UNIX and Linux systems.
Note: Run cicsmkcobol only when you install one of the following products:
- 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)
- New version or release of IBM MQ
- Export the following environment variable:
COBCPY= MQ_INSTALLATION_PATH/inc export COBCPY- Translate, compile, and link the program by typing:
cicstcl -l COBOL -e yourprog.ccp
Preparing CICS C programs
Build CICS C programs using the standard CICS facilities:
- Export one of the following environment variables:
- LDFLAGS = "-L MQ_INSTALLATION_PATH ࿄lib -lmqm_r" export LDFLAGS
- USERLIB = "-L MQ_INSTALLATION_PATH ࿄lib -lmqm_r" export USERLIB
- Translate, compile, and link the program by typing:
cicstcl -l C amqscic0.ccs
- CICS C sample transaction
Sample C source for a CICS IBM 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 with a queue name that is contained in the transmission header of the message. Any failures are sent to the queue SYSTEM.SAMPLE.CICS.DLQ. Use the sample MQSC script AMQSCIC0.TST to create these queues and sample input queues.