Using CICS

CICS is one of the elements of TXSeries. The versions of TXSeries that are XA-compliant (and use a two-phase commit process) are shown in Table 15.

The CICS two-phase commit process

This process applies to those versions of WebSphere MQ that support an XA-compliant external syncpoint coordinator as shown in Table 15.

Requirements of the two-phase commit process

When you use the CICS two-phase commit process with WebSphere MQ, note the following requirements:

Enabling the CICS two-phase commit process

To enable CICS to use a two-phase commit process to coordinate transactions that include MQI calls, add a CICS XAD resource definition stanza entry to the CICS region.

Here is an example of adding an XAD stanza entry for WebSphere MQ for Windows, where <Drive> is the drive where WebSphere MQ is installed (for example, D:).

cicsadd -cxad -r<cics_region> \
     ResourceDescription="MQM XA Product Description" \
     SwitchLoadFile="<Drive>:\Program Files\IBM\WebSphere MQ\bin\mqmc4swi.dll" \
     XAOpen=<queue_manager_name>

Here is an example of adding an XAD stanza entry for WebSphere MQ for UNIX systems:

cicsadd -cxad -r<cics_region> \
      ResourceDescription="MQM XA Product Description" \
      SwitchLoadFile="/opt/mqm/lib/amqzsc" \
      XAOpen=<queue_manager_name>

For information about using the cicsadd command, see the CICS Administration Reference, or CICS Administration Guide for your platform.

Calls to WebSphere MQ can be included in a CICS transaction, and the WebSphere MQ resources will be committed or rolled back as directed by CICS. This support is not available to client applications.

You must issue an MQCONN from your CICS transaction in order to access WebSphere MQ resources, followed by a corresponding MQDISC on exit.

Enabling CICS user exits

Before using a CICS user exit, read the CICS Administration Guide for your platform.

A CICS user exit point (normally referred to as a user exit) is a place in a CICS module at which CICS can transfer control to a program that you have written (a user exit program), and at which CICS can resume control when your exit program has finished its work.

One of the user exits supplied with CICS is the Task termination user exit (UE014015), invoked at normal and abnormal task termination (after any syncpoint has been taken).

WebSphere MQ supplies a CICS task termination exit in source and executable form:

Table 16. CICS task termination exits

WebSphere MQ for... Source Executable
Windows amqzscgn.c mqmc1415.dll
UNIX systems amqzscgx.c amqzscg

If you are currently using this exit, add the WebSphere MQ calls from the supplied exits to your current exits. Integrate the WebSphere MQ calls into your existing exits at the appropriate place in the program logic. See the comments in the sample source file for help with this.

If you are not currently using this exit, add a CICS PD program definition stanza entry to the CICS region.

Here is an example of adding a PD stanza entry for Windows:

cicsadd -cpd -r<cics_region> \
      PathName="<Drive>:\Program Files\IBM\WebSphere MQ\bin\mqmc1415.dll" \
      UserExitNumber=15

Here is an example of adding a PD stanza entry for UNIX systems:

cicsadd -cpd -r<cics_region> \
      PathName="/opt/mqm/lib/amqzscg" \
      UserExitNumber=15


© IBM Corporation 1994, 2002. All Rights Reserved