Understanding the EXEC Statement
Understanding the EXEC Statement
The EXEC statement serves as the starting point for each individual step within a job or procedure. Its primary role is to specify the program or procedure—whether cataloged or in-stream that the step will execute. Additionally, it provides instructions to the system on how to handle the execution of that step. A single job can include up to 255 steps
Syntax
//STEPNAME EXEC PGM=program-name
STEPNAME: A unique label for the step.
PGM: The name of the program or utility to execute.
Example
//STEP1 EXEC PGM=SORT
Here, the SORT utility is executed in the first step of the job.
Last updated