Command reference / CL

ENDPGM

End Program

Specifies the end of a CL program or ILE CL procedure. It performs the same function as a RETURN command: control returns to the command after the CALL command in the calling program. ENDPGM is not required. If the last statement in the source is reached without one, the compiler assumes an ENDPGM.

Allowed environments: *BPGM, *IPGM. Use within a CL program. Positional parameters: 0.

Restrictions

Parameters

No parameters.

Examples

PGM : ENDPGM

The CL program or ILE CL procedure is identified by a PGM command with no parameters and ended by ENDPGM.

IBM command documentation

Generated from os/cl/catalog/ENDPGM.json and os/cl/help/ENDPGM.json.