Preparing CICS programs

An XA switch module is provided to enable you to link CICS with WebSphere MQ:

Table 27. Essential Code for CICS applications (SINIX)

Description
C (source)
C (exec) - add one of the following
to your XAD.Stanza
XA initialization routine
amqzscix.c
amqzsc - CICS for Siemens Nixdorf
SINIX V2.2

Always link your transactions with the thread safe MQSeries library libmqm_r.so.

You can find more information about supporting CICS transactions in the MQSeries for SINIX and DC/OSx System Management Guide.

CICS on Open Systems support

MQSeries for SINIX supports CICS on Open Systems via the XA interface.

Note:
MQSeries for DC/OSx does not support CICS.

In order to enable the CICS run-time COBOL library to call MQSeries on UNIX systems, you must add the MQSeries COBOL run-time library module to the run-time library using the following command:

  cicsmkcobol libmqmcbrt.o -lmqm_r

It is important to ensure that the COBOL run-time library and CICS are linked to the same (DCE) version of the library. All CICS on Open Systems MQSeries transactions must link with libmqm_r.

CICS sample transaction

Sample C source for a CICS MQSeries transaction is provided by AMQSCIC0.CCS. You build it using the standard CICS facilities. Compile it using the following commands.

  1. Export the following environment variables:
    export CCFLAGS="-I/opt/mqm/inc -I/opt/mqm/samp"
    export USERLIB="-L/opt/mqm/lib -L/opt/cics/lib -lmqm_r -lmqmcs_r"
    
  2. Unset the lib path.
  3. Use the command:
      cicstcl -l C 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.



© IBM Corporation 1993, 2002. All Rights Reserved