EXEC statement
The JCL statement that starts a step by naming the program or procedure to run.
Also written //EXEC
The EXEC statement begins each step of a job and says what to execute. It takes one of two forms: run a named program, or invoke a named procedure containing its own steps.
It also carries a step name, which matters more than it first appears. That name is how the system identifies the step in messages, how you find it in the output, and how later steps refer back to it when testing results or reusing datasets it created.
Parameters can be passed to the program on this statement, which is how utilities are told what to do and how options are handed to a compiler. A time limit and a memory limit can be set here too, applying to that step alone.
Every EXEC statement is followed by the DD statements for that step, describing its files. That grouping is the basic rhythm of JCL: a step, then its files, then the next step, then its files.
Related terms
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- Job stepOne program execution within a job. A job is simply a sequence of steps that run in order.
- DD statementThe JCL statement that connects a name inside a program to a real dataset outside it.
- PROCA reusable piece of JCL stored as a member and invoked by name, so common steps are written once.
- Utility programA supplied program that performs a standard job such as copying, sorting, comparing or managing datasets, driven by control statements.