Ü RETURN Command
·
The RETURN command in a CL procedure or OPM program removes
that procedure or OPM program from the call stack.
·
If a MONMSG command specifies an action that ends with a
RETURN command, control is returned to the next sequential statement after the
statement that called the procedure or program containing the MONMSG command.
·
The RETURN command has no parameters.
Example
PGM
DCL &NAME *CHAR 20 +
VALUE('JOHN J.SMITH')
DCL &ADRESS *CHAR VALUE('123 MAINSTREET APARTMENT 45')
DCL &COMENT *CHAR 55 VALUE('LONG TIME CUSTOMER')
DCL &CREDLIMIT *DEC (11 2) VALUE(5000)
DCL &ACTIVE *LGL VALUE('1')
DMPCLPGM
CALL PGMB PARM(&NAME &ADRESS &COMENT 'PHILADEPHIA' &CREDLIMIT +
55400.10 &ACTIVE)
DMPCLPGM
SNDPGMMSG ('PROCESING COMPLETE') MSGTYPE(*COMP)
RETURN
ENDPGM