EXIT PROGRAM

End the execution sequence of a program or subprogram and return control to the invoking source.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Syntax:

EXIT PROGRAM

General Rules:

  1. EXIT PROGRAM can appear anywhere in an S-COBOL paragraph.
  2. In a called program, EXIT PROGRAM passes control to the first statement after the CALL statement in the calling program.
  3. An EXIT PROGRAM terminates all AMB programs, unless you include a STOP RUN or GOBACK (IBM COBOL extension).
  4. AMB generates an EXIT PROGRAM at the end of the first paragraph of any called program so that you do not need to code it.