Understanding JCL Job Steps and Parameters: A Complete Guide for Mainframe Professionals
Every Job can have a maximum of 255 individual or inter-dependent tasks, called as job steps. A step executes either a utility or a procedure.
UTILITY:
Pre-written IBM programs, widely used in mainframe to achieve day-to-day requirements like data manipulations, reporting, organizing, backup and maintaining data.
Utilities are widely classified into
- The ones that handle System-level functions.
To name a few:
- IEHLIST: Lists system control data, such as the contents of datasets.
- IEHMOVE: Moves or copies entire collections of data, such as generation data groups (GDGs).
- IEHPROGM: Also considered a system utility for building and maintaining system control data.
- The ones that handle Record level/data level processing.
To name a few:
- IDCAMS: The primary utility for managing VSAM datasets and catalogs. It is also used for non-VSAM datasets.
- IEBCOPY: Used to copy, merge, compress, backup, or restore partitioned datasets (PDS) and PDSEs.
- IEBGENER: A general-purpose utility for copying sequential datasets.
- IEBCOMPR: Compares the contents of two sequential datasets.
- IEBUPDTE: Used to create members in a PDS and update records within members.
- IEHPROGM: Deletes and renames datasets, and catalogs or uncatalogs them.
- IEFBR14: A “dummy” utility that performs no operation itself but can be used to create or delete datasets by invoking other system components.
Syntax:
//STEPNAME EXEC PGM=IEFBR14,[PARAMTERS]
PROCEDURE:
A reusable segment of JCL code containing one or more job steps, used to perform common tasks. This facility helps to avoid repeating the same steps in multiple jobs, which saves time, reduces errors, and improves programmer productivity.
A PROC is invoked from another JCL’s EXEC statement.
Syntax:
//STEPNAME EXEC PROC=PROCNAME,[PARAMTERS]
PARAMETERS.
Keyword parameters that control the execution of a single job step in a z/OS JCL (Job Control Language) stream. These parameters define how a specific step runs by setting resource limits (like CPU time or memory), specifying conditional execution logic, or directing output.
- TIME: Specifies the maximum processor time allowed for the step, e.g., TIME=(1,30) for 1 minute and 30 seconds.
- REGION: Allocates the required address space for the step, such as REGION=4096K for 4096 kilobytes.
- COND: Controls conditional execution, allowing a step to run or be skipped based on the return code of a previous step. For example, COND=(8,LT,STEP1) means the step will execute only if the return code from STEP1 was less than 8.
- PARM: Passes parameters directly to the program being executed in that step. It also accepts Compiler options.
These options control various aspects of the compilation process, influencing how the source code is translated into an executable module.
LIST, OFFSET, RENT, and SSRANGE are COBOL compiler options.
- MSGCLASS: Assigns an output message class for this step.