Abnormal termination recovery

CICS® provides a program-level abend exit facility so that you can write exits of your own which can receive control during abnormal termination of a task. The "cleanup" of a program that has started but not completed normally is an example of a function performed by such an abend exit.

Here are some causes of abnormal terminations:

Note:
If an ASRB or ASRA is detected in CICS code, CICS produces a dump before calling your HANDLE ABEND exit.

See the CICS Problem Determination Guide for full details about fixing problems, and see the CICS Messages and Codes for information about the transaction abend codes for abnormal terminations that are initiated by CICS, their meanings, and your responses.

The HANDLE ABEND command activates or reactivates a program-level abend exit within your application program; you can also use this command to cancel a previously activated exit.

When activating an exit, you must use the PROGRAM option to specify the name of a program to receive control, or (except for C, C++, and PL/I programs) the LABEL option to specify a routine label to which control branches when an abnormal termination condition occurs. Using an ON ERROR block in PL/I is the equivalent of using the HANDLE ABEND LABEL command.

A HANDLE ABEND command overrides any preceding such command in any application program at the same logical level. Each application program of a transaction can have its own abend exit, but only one abend exit at each logical level can be active. (Logical levels are explained in Program control.)

When a task terminates abnormally, CICS searches for an active abend exit, starting at the logical level of the application program in which the abend occurred, and proceeding to successively higher levels. The first active abend exit found, if any, is given control. This procedure is shown in Figure 76, which also shows how subsequent abend processing is determined by the user-written abend exit.

If CICS finds no abend exit, it passes control to the abnormal condition program to terminate the task abnormally. This program invokes the user replaceable program error program, DFHPEP. See the CICS Customization Guide for programming information about how to customize DFHPEP.

CICS deactivates the exit upon entry to the exit routine or program to prevent recursive abends in an abend exit. If you wish to retry the operation, you can branch to a point in the program that was in control at the time of the abend and issue a HANDLE ABEND RESET command to reactivate the abend exit. You can also use this command to reactivate an abend exit (at the logical level of the issuing program) that was canceled previously by a HANDLE ABEND CANCEL command. You can suspend the HANDLE ABEND command by means of the PUSH HANDLE and POP HANDLE commands as described in Using PUSH HANDLE and POP HANDLE commands.

Note that when an abend is handled, the dynamic transaction backout program is not be invoked. If you need the dynamic transaction backout program, you take an implicit or explicit syncpoint or issue SYNCPOINT ROLLBACK or issue an ABEND command.

Where the abend is the result of a failure in a transaction running in an IRC-connected system, for example AZI2, the syncpoint processing may abend ASP1 if it attempts to use the same IRC connection during its backout processing.

The HANDLE ABEND command cannot intercept ASPx or APSJ abend codes.

This chapter describes:

[[ Contents Previous Page | Next Page Index ]]