Creating a program-level abend exit

You can either define abend exits by using RDO or by using the program autoinstall exit. If you use the autoinstall method, the program definition is not available at the time of the HANDLE ABEND. This may mean that a program functions differently the first time it is invoked. If the program is not defined at the time the HANDLE ABEND is issued, and program autoinstall is active, the security check on the name of the program is the only one which takes place. Other checks occur at the time the abend program is invoked. If the autoinstall fails, the task abends APCT and control is passed to the next higher level.

Abend exit programs can be coded in any supported language, but abend exit routines must be coded in the same language as their program.

For abend exit routines, the addressing mode and execution key are set to the addressing mode and execution key in which the HANDLE ABEND command has been issued.

Upon entry to an abend exit program, no addressability can be assumed other than that normally assumed for any application program coded in that language. There are no register values for C, C++, or PL/I languages as these languages do not support HANDLE ABEND label.

Upon entry to an abend exit routine, the register values are:

COBOL
Control returns to the HANDLE ABEND command with the registers restored; a COBOL GOTO is then executed.
Assembler
Reg 15
Abend label.
Reg 0-14
Contents at the time of the last CICS® service request.

There are three means of terminating processing in an abend exit routine or program, as listed below. It is recommended that when abend routines and programs are called by CICS internal logic they should terminate with an abend because further processing is likely to cause more problems.

  1. Using a RETURN command to indicate that the task is to continue running with control passed to the program on the next higher logical level. If no such program exists, the task is terminated normally, and any recoverable resources are committed.
  2. Using an ABEND command to indicate that the task is to be abnormally terminated with control passed either to an abend exit specified for a program on a higher logical level or, if there is not one, to the abnormal condition program for abnormal termination processing.
  3. Branching to retry an operation. When you are using this method of retrying an operation, and you want to reenter the original abend exit routine or program if a second failure occurs, the abend exit routine or program should issue the HANDLE ABEND RESET command before branching. This is because CICS has disabled the exit routine or program to prevent it reentering the abend exit.

In the case of an abend caused by a timeout on an outstanding RECEIVE command, it is important to let the CICS abend continue, so that CICS can cancel the RECEIVE.

[[ Contents Previous Page | Next Page Index ]]