Previous Topic: Elapsed Time

Next Topic: New Topic

Exit Program

The *EXIT PROGRAM built-in function specifies an exit from a program.

The only parameter for this built-in function is the *Return code. You can use the *Return code parameter to inform the calling program of the circumstances under which the program was exited.

CA 2E supplies the *Return code field from the PGM context as an input parameter, by default. You can also supply alternate conditions to the *Return code field, other than those supplied by default, such as *Record does not exist.

CA 2E implements the *EXIT PROGRAM built-in function as a call to a CA 2E supplied exit subroutine, ZYEXPG. This issues an *EXIT PROGRAM in COBOL or in RPG. If closedown program is specified, RPG also sets on the LR indicator.