End Program (ENDPGM)
Where allowed to run:
|
Parameters Examples Error messages |
The End Program (ENDPGM) command specifies the end of a CL program or ILE CL procedure. When the command is processed, it performs the same function as a RETURN command. That is, control is returned to the command immediately following the CALL command in the calling program.
The ENDPGM command is not required at the end of a CL program or ILE CL procedure. If the last statement in a CL program or ILE CL procedure source file is reached and no ENDPGM command is found, an ENDPGM command is assumed by the compiler.
Restrictions: This command is valid only within a CL program or ILE CL procedure.
There are no parameters for this command.
Top |
Examples
PGM : ENDPGM
This CL program or ILE CL procedure is identified by a PGM command that contains no parameters and is ended by the ENDPGM command.
Top |
Error messages
None
Top |