Control flow and communicate between programs and procedures

You can use the Call Program (CALL), Call Bound Procedure (CALLPRC), and Return (RETURN) commands to pass control back and forth between programs and procedures.

Each command has slightly different characteristics. Information may be passed to called programs and procedures as parameters when control is passed.

Special attention should be given to programs created with USRPRF(*OWNER) that run CALL or CALLPRC commands. Security characteristics of these commands differ when they are processed in programs running under an owner's user profile.

Related concepts
Parts of a CL procedure
Related tasks
Use variables
Display the call stack
Related information
Call Bound Procedure (CALLPRC) command
Call (CALL) command
Return (RETURN) command
iSeries Security Reference