Execute Statement
Execute Statement
Execute Statement Format
The execute statement is used to identify a program or procedure that you want to execute. The stepname is a name that you assign. Use the same format described in this module in the section titled Jobname.
Format (A caret (^) indicates a space.):
//stepname^EXEC^PGM=progname
The positional parameter, PGM=, is used to identify the program that the system is to execute. The specified program must be a member of a partitioned data set used as a system library, a private library, or a temporary library.
The progname is the name of a program that you want to execute. If this program resides in a private library, that library must be specified in the job by a JOBLIB data definition statement or in a job step by a STEPLIB data definition statement.
Format (A caret (^) indicates a space.):
//stepname^EXEC^PROC=procname
or
//stepname^EXEC^procname
The optional positional parameter, proc=, is used to specify that the system is to call and execute a cataloged or in-stream procedure.
The procname is the name of a procedure that you want to execute. If the procedure is in-stream, it must be before the execute statement.
Execute Statement Examples
Example (A caret (^) indicates a space.):
//STEP1^^^^EXEC^IDCAMS
The stepname is STEP1.
The IDCAMS procedure is executed by this job step.
Example (A caret (^) indicates a space.):
//COPY^^^^^EXEC^TAPECOPY,TAPEIN=T12345,TAPEOUT=T678 90
The stepname is COPY.
The TAPECOPY procedure is executed by this job step.
The parameters following the procedure name instruct the system to copy the information from tape T12345 to tape T67890.
Comments
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


