Handle an abnormal termination exit.
HANDLE ABEND is used to activate, cancel, or reactivate an exit for abnormal termination processing. You can suspend the command by means of the PUSH HANDLE and POP HANDLE commands as described in the CICS® Application Programming Guide.
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.
The HANDLE ABEND command cannot intercept abends that are issued with the CANCEL option. Some internal abends generated by CICS are issued with the CANCEL option, for example the ASPx or APSJ abend codes.
If LABEL is specified, the addressing mode and execution key used are those of the program that issued the HANDLE ABEND command.
If PROGRAM is specified, the addressing mode is defined by the way the program is link-edited and the execution key is specified by the EXECKEY option on the program's resource definition.
If a COMMAREA has been established, it will be passed to the specified PROGRAM. Where more than one application program was involved in the task, note that the COMMAREA that is passed to the abend exit is the COMMAREA of the program that issued the HANDLE ABEND command. This is not necessarily the COMMAREA of the program in which the abend actually occurred.
If a current channel exists,
it will be accessible from the specified PROGRAM.
This option cannot be used for C or PL/I application programs.
The program named in this option should always terminate with an abend, except when handling abends generated as a result of application program logic.
This option is usually issued by an abnormal termination exit routine.
Default action: terminate the task abnormally.
Default action: terminate the task abnormally.
EXEC CICS HANDLE ABEND
PROGRAM('EXITPGM')