JCL Coding Rules

Coding Rules in JCL

A JCL statement is divided into various fields. We require IDENTIFIER (mandatory), NAME, OPERATION field, OPERAND fields and COMMENTS (optional) if any.

IDENTIFIER in JCL

Every JCL statement starts with two forward slashes (//) and it is called as Identifier in JCL. This identifies that a particular statement is a JCL statement.

The only exception is delimiters (/*). Do not worry about Delimiter, you learn it in detail as you move further.

Column 1 to Column 2 contains Identifier in JCL

JCL COMMENT

Comments are optional in JCL. If you need to comment out a line, you need to place an asterisk symbol (*) in the 3rd column.

Column 3 must contain a * if this line is a comment

NAME field IN JCL

The Name field is optional in JCL. There can be name field as  Job Name or Step Name or DD Name.

Name field starts from 3rd column and it can extend to 10th column maximum.

The OPERATION field starts at 12th Column and must end before column 15th or at exactly column 15th. This field includes JOB, EXEC or DD statement. And you will learn all the statements in detail as you move further.

JCL OPERATION field

Operation field starts from 12th column and it can extend to 15th column maximum.

The JCL OPERAND field

There must be a space after the OPERATION and OPERAND field can start immediately after space. It can extend up to column 71.

CONTINUATION field in JCL

We need to give CONTINUATION field at column 72 in JCL.

You cannot continue everything in JCL and there is a limitation. Like you can’t continue the following statements to the next line –

  • JCL Command statement
  • Comment statement
  • Delimiter statement
  • Null statement
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOWRD.

PROCEDURE DIVISION.
DISPLAY "SIMPLE HELLO WORLD".
STOP RUN.

Output

SIMPLE HELLO WORLD

Tutorials for all brains!