Purging tasks that are using the CICS-MQ connection

You can use the CICS® CEMT transaction to purge user tasks that are using the CICS-MQ adapter.

About this task

Tasks that are waiting on the adapter respond only to CEMT SET TASK FORCEPURGE commands. CEMT SET TASK PURGE commands are ignored. For the full syntax of the CEMT SET TASK command, see CEMT SET TASK.

Procedure

  1. Use the CICS-MQ adapter control panels to display details of tasks that are using the CICS-MQ connection, including their task numbers. Note the numbers of any tasks that you want to purge.
  2. For each task that you want to forcepurge, enter the command CEMT SET TASK(number) FORCEPURGE on the CICS command line, where number is the task number for the task.

Results

The way that the CICS-MQ adapter handles a FORCEPURGE command depends on the kind of wait state for the task:
  • If a task is waiting for a message to arrive, for example, if the application has issued an MQGET WAIT call, the task is stopped with code AEXY immediately.
  • Otherwise, 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 adapter lets the task continue and ignores the attempt to purge it, to preserve data and system integrity. Message DFHMQ0415I is displayed. A task is in a critical state when, for example, it is in the process of completing phase 2 of a 2-phase commit sequence.
    • If the task is not in a critical state, the adapter ends it with code AEXY. Message DFHMQ0414I is displayed.