Use the RETURN command

The Return (RETURN) command in a CL procedure or OPM program removes that procedure or OPM program from the call stack.

If the procedure containing the Return (RETURN) command was called by a Call Bound Procedure (CALLPRC) command, control is returned to the next sequential statement after that Call Bound Procedure (CALLPRC) command in the calling program.

If a Monitor Message (MONMSG) command specifies an action that ends with a Return (RETURN) command, control is returned to the next sequential statement after the statement that called the procedure or program containing the Monitor Message (MONMSG) command.

The Return (RETURN) command has no parameters.

Note: If you have a Return (RETURN) command in an initial program, the command entry display is shown. You may wish to avoid this for security reasons.
Related information
Call Bound Procedure (CALLPRC) command
Monitor Message (MONMSG) command
Return (RETURN) command