ABEND Function

The ABEND function initiates Com-plete abnormal termination processing for an application program. A hex dump of the program storage area is produced. The program does not regain control.

An abend code can be specified by using the optional abcodeargument. This code is displayed at the terminal for online programs, and is included in the printout for batch programs. The largest number that can be given for the abend code is 9999. If the number is omitted or is larger than 9999, Com-plete will initialize the abend code to 255.

The ABEND function is useful when debugging an application program. Several ABEND CALL statements can be coded, each with an abcode value, to enable tracing program logic by halting execution at various node points. The abcode returned to the screen or printout data set facilitates the following of the execution logic of the program, and the dump-generated aids in identifying and correcting errors.

Format

The format for using the ABEND function is:

ABEND [(abcode)]
abcode Optional.
Default: 255 The user-supplied abend termination code. The largest value permitted is 9999. If the abcode is omitted or is larger than 9999, Com-plete defaults to 255.
Return Codes

No return codes are provided by the ABEND function because control is not returned to the application program.