Skip to content
JCL & batch

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.

Browse all 115 terms

Learn this properly.

Use EXEC statement for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.