Previous Topic: Handling db-key DeadlocksNext Topic: Establishing and Posting Events


Performing Abend Routines

You can establish linkage to an abend routine to which DC passes control if the issuing task terminates. Optionally, you ca CAncel linkage to a previously established abend routine. Each level in a task can have one abend exit in effect at any given time; if more than one abend exit has been established for a level, DC recognizes the last abend exit requested.

Executing Abend Exits

When a task terminates abnormally (following a processing error or an ABEND request), abend exits for the program that was executing at the time of the abend and for all higher-level programs will be executed before the task is terminated. You can prevent DC from executing abend exits automatically by coding the EXITS IGNORED clause in an ABEND request (explained above) or by specifying the abort or continue options in the abend routine's DC RETURN statement. DC RETURN requests are typically handled as follows:

SET ABEND EXIT Statements

To establish linkage to an abend exit, which will be invoked if the issuing task terminates, issue a SET ABEND EXIT statement that specifies the program to be called in the event of an abend.

To cancel any previously requested abend exits for the issuing task level, issue a SET ABEND EXIT OFF command.