Job step
One program execution within a job. A job is simply a sequence of steps that run in order.
Also written step
A step is a single program execution inside a job. Each one begins with an EXEC statement naming what to run, followed by DD statements describing the files it needs.
Jobs are built from steps because real work has stages. A typical batch job might extract records in the first step, sort them in the second, run a report program in the third, and copy the result somewhere in the fourth. Each step is a separate program, and the output of one is usually the input of the next.
Steps run in the order written, and each finishes with a return code. That code is what later steps can test, so a job can skip the report if the extract found nothing, or stop entirely if something failed.
Because steps are individually named, they are also the unit of diagnosis and restart. When a job fails, you are told which step failed, and a rerun often starts from that step rather than the beginning.
Related terms
- JobA unit of batch work submitted to the system, made up of one or more steps that run in order.
- EXEC statementThe JCL statement that starts a step by naming the program or procedure to run.
- DD statementThe JCL statement that connects a name inside a program to a real dataset outside it.
- Return codeA number a program leaves behind saying how it went. Zero for clean, higher numbers for warnings and failures.
- COND parameterThe older way of telling a job step whether to run, based on the return codes of earlier steps.