Coding Sheet
Coding Sheet
The JCL coding sheet is a structure to identify from where each statement coding should start and how each one is different from other statements.
Columns | Description |
---|---|
1& 2 Columns | Every line in the JOB should start with null indicator(//) except the input stream (SYSIN). |
3 | '*' in the third column specifies that the line is a comment. |
3-10 | 1-8 character Name Field (job-name/step-name/dd-name). |
11 | One space to separate the Name and Operation fields. |
12-15 | Operation (JOB/EXEC/DD). |
16 | One space to separate the Operation and Operands fields. |
17-71 | Reserved for Operands (parameters for the operation). |
72 | Reserved for Continuation column (,). |
Points to Note -
- Every line should start with the null indicator (//) in first two columns that includes a comment.
- Parameters should be separated by a comma(,).
- No space is allowed in between parameters except comma(,).
- The continuation character(,) can be coded anywhere between 17 to 72 characters.
- If any statement continues more than one line -
- The current line should end with a comma (,) immediately after the last parameter.
- The following line should start on or before the 16th column.
- If there is more than one space between the fields in a line, we can replace the multiple spaces with one.
- Null indicator (//) alone represents the end of the job.
For example -
Observe the alignment in the two examples; the change won't throw any error.
----+----1----+----2----+----3
//STEP01 EXEC PGM=IKJEFT01
can also be written as -
----+----1----+----2----+----3
//STEP01 EXEC PGM=IKJEFT01
Info! We can ignore the coding sheet positions when coding a TEST JOB. However, the coding sheet should strictly follow when coding a PRODUCTION JOB in real-time.
Statement types -
Each line in JOB falls under two categories based on how they coded, and those are -
- JCL Statement.
- JCL comment.
JCL Statement -
JCL statement is an active statement (without '*' in the third column) that considers as an instruction to OS. One JCL statement means one operation (JOB/EXEC/DD) with all its parameters. JCL statements are three types -
- JOB Statement.
- EXEC Statement.
- DD Statement.
We will discuss about each statement in further chapters.
For Example - The diagram explains how the JCL statements are divided.
JCL Comment -
- JCL comment is an inactive statement that provides information about the task or other JCL statements.
- Comment should have a '*' in the 3rd column.
- Comment text can start in any column, but the third column should have '*'. Otherwise, JCL tries to treat it as a JCL statement and throws a JCL error during the execution.
Note! If the null indicator (//) alone is coded in a line, it is treated as the end of the JOB.
For Example - The diagram explains how the comments are coded.