Purging tasks that are using the CICS adapter
We can use the CICS CEMT transaction to purge user tasks that are using the CICS adapter. Tasks that are waiting on the adapter respond only to CEMT SET TASK FORCEPURGE commands--CEMT SET TASK PURGE commands are ignored. The way the adapter handles a FORCEPURGE command depends on the kind of wait state that the task is in:
- If a task is waiting for a message to arrive, for example, the application has issued an MQGET WAIT call, the task is stopped with code AEXY immediately.
- If a task is waiting for an MQI request to be completed by WebSphere MQ, message CSQC413I is displayed on the system console.
The adapter waits for the request to complete, and then checks whether it is suitable to end the task:
- If the task is in a critical state, the CICS adapter lets the task continue and ignores the attempt to purge it. This is done to preserve data and system integrity. Message CSQC415I is displayed.
A task is in a critical state is when, for example, it is in the process of completing phase 2 of a two-phase commit sequence.
- If the task is not in a critical state, the adapter ends it with code AEXY. Message CSQC414I is displayed.
For information about CEMT commands, see the CICS-Supplied Transactions manual.