If, during transaction abend processing, another abend occurs and CICS® continues, there is a risk of a transaction abend loop and further processing of a resource that has lost integrity (because of uncompleted recovery). If CICS detects that this is the case, the CICS system abends with message DFHPC0402, DFHPC0405, DFHPC0408, or DFHPC0409.
The action taken by CICS on the abend exit code can:
Abnormal termination of a task describes the processing that may follow the abnormal termination of a task.
Exit code can be written either in programs (separate modules defined in the CSD) or in routines within the application program. Exit code, if activated, can gain control when a task abend occurs.
Exit code can be activated, deactivated, or reactivated by HANDLE ABEND commands. For information about HANDLE ABEND commands, see the CICS Application Programming Reference.
Only one abend exit can be active at any given logical level 6 within a task. This means that:
Reasons that an application programmer might have for coding a program level abend exit, and functions that might be incorporated, are discussed in Handling abends and program level abend exits.
When an abend request is issued for a task, CICS immediately passes control to the exit that is active at the current logical level:
When control is transferred to any exit code, CICS deactivates the exit before any of its code is executed. (This means that, in the event of another abend request, the exit will not be reentered, and control is passed to activated exit code (if any) at the next higher level.)
The exit code then executes as an extension of the abending task, and runs at the same level as the program that issued the HANDLE ABEND command that activated the exit.
After any program-level abend exit code has been executed, the next action depends on how the exit code ends:
In the special case of a RETURN command being issued by exit code at the highest logical level, CICS regains control and terminates the task normally. This means that:
If the exit code ends with an ABEND command, or if there is no active exit code, abnormal termination of a task starts after all active program-level abend exits (if any) have executed. The sequence of actions during abnormal termination of a task depends on the following factors:
The transaction restart user-replaceable module (DFHREST) enables you to participate in the decision as to whether a transaction should be restarted or not. The default program requests restart under certain conditions; for example, in the event of a program isolation deadlock (for instance, when two tasks each wait for the other to release a particular DL/I database segment), one of the tasks is backed out and automatically restarted, and the other is allowed to complete its update.
For programming information about how to write your own code for DFHREST, see the CICS Customization Guide.