The EXEC Command

A procedure also calls another one with the command EXEC. The called procedure must be fully executable.

See Supplying Values for Variables for additional information about passing parameter values.

Use the EXEC (or EX) Command

Procedure lines with EXEC (or EX) commands temporarily stop execution of the current procedure and call the new procedure. The new procedure may be passed current variables that are available as parameter values to the new procedure, but must do so explicitly unless those variables are global variables.

EXEC [appname/]filename [parm[,...]]

where:

appname

Is the location of the called procedure.

filename

Is the name of the called procedure.

parm[,...]

Are one or more parameters being passed, either positionally or by name.