Using the KILL option for purging transactions

It is possible for a looping CICS task or shortage of CICS resources to bring all normal processing in a CICS region to a halt. In such a situation, it could become impossible for you to cancel the task or tasks using any of the standard CICS mechanisms, for example, PURGE or FORCEPURGE. In other cases, it might not even be possible to list the active tasks in order to investigate the problem. The only way for you to recover from such a situation is to recycle the CICS region. The purpose of this new function is to enhance your ability to remove such tasks more quickly from a CICS region with the minimum impact on the integrity of your systems.

If you can identify the task that is causing the problem you should try to use the PURGE or FORCEPURGE options of the CEMT SET TASK command. Both PURGE and FORCEPURGE have been significantly enhanced and using these options may well enable you to remove the task retaining system and data integrity.

If neither PURGE or FORCEPURGE respond within a reasonable time, you can use the new KILL option that has been added to the CEMT SET TASK, CEMT SET CONNECTION, and CEMT SET TERMINAL commands. The KILL option allows you to cancel tasks that could not have been cancelled using the PURGE or FORCEPURGE options. The KILL option is also supported on the equivalent EXEC CICS commands.

It may be impossible for you to use normal methods, such as CEMT, CICSPlex SM or CICS PM to list the active tasks in the system and hence to determine which task or tasks should be cancelled. To overcome this a new transaction, CEKL, has been added.

The CEKL transaction differs from other CICS supplied transactions in that you do not have to install definitions for it. Also you can invoke it only from an operating system console, which does not have to be defined to CICS. The CEKL INQUIRE TASK command allows you to list information about tasks in the CICS region; for example, all tasks that are suspended. The CEKL SET TASK command allows you to cancel a selected task using the PURGE, FORCEPURGE or KILL option. The CEKL transaction forms part of the CICS console interface and runs on a dedicated CICS internal TCB which enables commands to be processed even when the rest of CICS is unresponsive.

The KILL option does not guarantee integrity of any kind but in some situations it allows the user to free up a stalled region enabling the region to continue processing.

Using CEMT to terminate a task

Having identified the problem task, you can then use the normal process of attempting to remove the task from your system using either PURGE or FORCEPURGE through the CEMT SET TASK (value) PURGE transaction. Initially you can track the state of the task to see if it has successfully removed. Two things may have happened:

If the task could not be purged but CEMT is available, try using the new KILL option. You must try FORCEPURGE before using KILL. See Consequences of using KILL before using this option.

If CEMT is unavailable, consider using the new CEKL command, see Using the console to terminate a task.

Using the console to terminate a task

You can identify problems in your system using the CEMT transaction, CICSPlex SM or CICS Performance Monitor. However, if these are not available or not running (because the QR TCB is looping or suspended), you can use the new command, CEKL:

For full details about CEKL, see CEKL--master terminal (emergency use).

Identifying tasks using CEKL
You can use CEKL INQUIRE TASK in a number of ways:
Removing tasks using CEKL
CEKL SET TASK(value) has three options: PURGE, FORCEPURGE or KILL. The preferred sequence of issuing the commands is as follows:
  1. Try PURGE first if the task is purgeable.
  2. If the task is not purged in a reasonable time, try using the FORCEPURGE option.
  3. If the task is not purged in a reasonable time, try using the KILL option.
Note:
Using CEKL you can request a task to be killed without having first tried PURGE or FORCEPURGE, see Consequences of using KILL.
Monitoring tasks using CEKL
CEKL INQUIRE TASK(value) returns the details of a single task. This is useful to monitor a task after you have requested it to be purged, forcepurged or killed.

Consequences of using KILL

WARNING: This action may result in unpredictable effects, including overwriting of data within the CICS region or abnormal termination of the CICS region. It should only be used as a last resort.

Following the use of the KILL option, an abend code is issued that reports the protective state of the task (purge or forcepurge protection) when it was killed. Regardless of the state of the transaction KILL cannot guarantee any data or system integrity.

Using CEMT (or equivalent SPI commands), you are not allowed to kill a task without having first attempted to forcepurge it.

You can use CEKL to kill the task without having first forcepurged it. Use CEKL is very much the option of last resort.

Removing tasks may have an effect on the integrity of your system, Table 1 shows the possible consequences of using purge, forcepurge or kill.

Table 1. Data and system integrity
System integrity Data integrity
PURGE YES YES
FORCEPURGE YES NO
KILL NO NO

CICS ignores a request to purge a task if the task is marked non-purgeable.

CICS may ignore or delay processing a request because of a risk of damaging CICS system integrity, for example, because I/O may still be in progress to a buffer owned by the task, or because recovery processing would be unable to complete.

[[ Contents Previous Page | Next Page Index ]]