Home
Sample task termination exit
WebSphere MQ supplies sample source code for a CICS task termination exit in the following directories:
CICS task termination exits Platform Directory Source file AIX /opt/mqm/samp amqzscgx.c Other UNIX systems /usr/mqm/samp amqzscgx.c Windows c:\\IBM\Websphere MQ\Tools\c\Samples amqzscgn.c The build instructions for the sample task termination exit are contained in the comments near the top of each source file.
This exit is invoked by CICS at normal and abnormal task termination (after any syncpoint has been taken). No recoverable work is permitted in the exit program.
These functions are only used in a WebSphere MQ and CICS context in which the CICS version supports the XA interface. CICS refers to these libraries as "programs" or "user exits".
CICS has a number of user exits and amqzscgx, if used, is defined and enabled on CICS as the "Task termination user exit (UE014015)", that is, exit number 15.
When the task termination exit is called by CICS, CICS has already informed WebSphere MQ of the task's termination state and WebSphere MQ has taken the appropriate action (commit or rollback). All the exit does is to issue an MQDISC to clean up.
One purpose of installing and configuring your CICS system to use a task termination exit is to protect your system against some of the consequences of faulty application code. For example, if your CICS transaction ends abnormally without first calling MQDISC, and has no task termination exit installed, then you might see (within around 10 seconds) a subsequent catastrophic failure of the CICS region. This is because WebSphere MQ's health thread, that runs in the cicsas process, will not have been posted and given time to clean up and return. The symptoms might be that the cicsas process ends immediately, having written FFST™ reports to /var/mqm/errors or the equivalent location on Windows.
Parent topic:
Enabling CICS user exits
fa13971_
Home