HANDLE ABEND - IBM Mainframe

The HANDLE ABEND command is used to handle abnormal termination recovery situations. It allows the program to activate, cancel, or reactivate an exit for abnormal termination processing. Command suspension can occur with the PUSH HANDLE and POP HANDLE commands. The syntax of the command is given below:

HANDLE ABEND

The various options of the command are given below. All of these options are mutually exclusive and therefore only one option may be used at a time with this command.

  • CANCEL - Option when specified cancels the effect from a previous HANDLE ABEND command at the same program level.
  • LABEL (label) - Identifies the COBOL paragraph or section name of a routine where the program control will branch should an abnormal termination occur. This option cannot be used for C/370 or PL/I application programs.
  • PROGRAM (name) - Character field (1-8 bytes) specifying the name to be invoked (by the LINK command) if the current task terminates abnormally. The name must have been defined in the processing program table (PPT).
  • RESET - Specifies that a previously issued HANDLE ABEND CANCEL is cancelled, and that the abend exit should be reactivated. This option is usually issued by an abnormal termination exit routine.
  • Handle Conditions:
  • NOTAUTH - Resource security check failure has occurred on PROGRAM (name). The default action is the abnormal termination of the task.
  • PGMIDERR - Can occur for any of the following reasons:
  • Program specified is not contained in the CICS PPT
  • The program is disabled
  • Program definition installed is for a remote program
  • The default action is the abnormal termination of the task. The HANDLE ABEND command cannot intercept the ASPx or APSJ at end codes. When the label option receives control from the command from the format HANDLE ABEND LABEL, the registers are set as listed below:
  • COBOL - Control returns to the HANDLE ABEND command with the registers restored; COBOL GOTO statement is then executed.
  • ASM - R15-Abend label.
  • RO-14 - Contents at the time of last CICS service request.

Addressing Mode

  • If LABEL is specified - addressing mode is set from the way in which the HANDLE ABEND command has been issued.
  • If PROGRAM is specified - addressing mode is set when the program is link-edited.

Execution Key

  • If LABEL is specified - control is received in the execution key that the program was running in when the HANDLE ABEND command was issued.
  • If PROGRAM is specified - control is received in the execution key as specified by the EXECKEY option on the program resource definition.

The programmer should as a general rule $pt for the normal system default abend routines thus allowing the PSW to be produced in the dump which is used in debugging the abend.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics