Structure


JCL structure defines the predefined structure to create a JOB. If we are coding a JCL, we should follow these guidelines to create an error-free JCL.

First of all, let us see the structure of JCL with all three types of statements -

Structure

Every JCL is divided into two parts based on the statements coding -

  • JOB Card
  • JOB Body

JOB Card -


  • A JOB statement with all its parameters is also called as JOB Card.
  • A JOB card makes the OS aware of the specific job after it submits and provides the parameters required to run the job.
  • A JOB card is mandatory for the job to run and should code only once at the beginning of the job.

JOB Body -


A JOB Statement contains the JOB keyword, and it is also called as JOB Card. Except the JOB card, the remaining part of the JCL is called as JOB Body.

A JOB Body contains multiple steps and can have up to 255 steps. Each step is coded with a single EXEC statement. EXEC statement is mandatory for the particular step of JOB Body. So at max, a JOB can have up to 255 EXEC statements.

A DD statement always comes with an EXEC statement. i.e., those always come under a specific step. DD statement is optional for the particular step. An EXEC statement can have up to 255 DD statements.

A JOB body can contain a maximum of 255 (EXEC) steps, and each step can have up to 255 DD statements.

Example -


Scenario - A simple JCL to explain different JCL structures.

Structure