JCL Coding Sheet

JCL Introduction JCL Structure

Advertisements



	1& 2 Columns 	- 	Every line of coding in the JCL should start with //.
				// are mandatory for every line in the JCL except input cards. 
3 - * in third column will indicate that the line is comment.
4-10 - Name field
11 - One space should be existed in between the Name and Operation.
12-15 - Operation
16 - One space should be existed in between the Operation and Operands.
17-71 - Operand
72 - Continuation column

Each line in JCL will be treated as two types.


  1. JCL Statement
  2. JCL comment

JCL Statement:


JCL statement is an active statement which specifies an action to complete.

JCL comment is inactive statement which provides information to understand about the JCL statement.


Each JCL statement can be divided into three parts.


  1. Name field
  2. Operation
  3. Operand

Name Field:

Name field is of length 8 characters.

Name field specifies the DD name in DD statement or step name in EXEC statement or Job name in JOB Statement.

Allows the combination alphabets, numbers, @, # and $.

First letter should not be number.

Starts from 3rd character and continue up to 11 characters.

Name field is optional during the concatenation of DD statements. In remaining all situations it is required but not mandatory.


Operation:

Operation field describes about the type of operand.

Operation field specifies the operation type like JOB for JOB statement, EXEC for EXEC statement, DD for DD statement and PEND for PROC end.

Operation is of length 4 characters.

Starts from 12th character and continue up to 15th character.

Operation is mandatory with every name field.

Operation field should be any one of the JOB, EXEC, DD and PEND.

The operation field can also code in the operand coding positions if the name field specified.


Operand:

Operand describes the parameters for the operation.

Operand starts at 17th column and continue up 72 columns.

Operand can end at any column between 17th to 72 columns.

Operand field is mandatory if operation field is specified.

If the operand is more than 55 characters, it can be continued in the next line. But need to do two things.


  1. Current statement should end with ‘,’ in 72 column.
  2. 2. The remaining operand can start from or before 16th column in the next line.

If the remaining operand not started from or before 16th column, then the below error message will be displayed during JSCAN.

“E1 8 DSS10075E CONTINUATION LINE STARTS BEYOND COLUMN 16.”


Example:

Simple JCL to explain different JCL statements.


=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000001 //MTHUSERR JOB (META007),'PAWAN Y',CLASS=A,MSGCLASS=L,MSGLEVEL=(1,1),   
000002 //             TIME=1440,NOTIFY=&SYSUID                                 
000004 //JOBLIB   DD  DSN=MTHUSER.MY.LOADLIB,DISP=SHR                          
000008 //STEP01  EXEC PGM=EXAMPROG                                             
000009 //STEPLIB  DD  DSN=MTHUSER.TEST.LOADLIB,DISP=SHR                        
000010 //INPFILE  DD  DSN=MTHUSER.EXAMPROG.INPUT,DISP=SHR                      
000011 //OUTFILE  DD  DSN=MTHUSER.EXAMPROG.OUTPUT,                             
000012 //             DISP=(NEW,CATLG,DELETE),                                 
000013 //             UNIT=(SYSDA,20),                                         
000014 //             SPACE=(CYL,(50,25)),                                     
000015 //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,BUFNO=2)                
000017 //SYSPRINT DD  SYSOUT=*                                                 
000018 //SYSUDUMP DD  SYSOUT=*                                                 
000019 //SYSOUT   DD  SYSOUT=*                                                 
****** **************************** Bottom of Data ****************************


JCL Comment:


JCL comment is inactive statement which provides information to understand about the JCL statement.

Comment used to specify a note about the current or beside statement.

Comment should have a ‘*’ in the third column.

Comment text can start in any column of any row but the third column should have ‘*’.

Otherwise, JCL tries to treat it as a normal JCL statement and thorow error during the execution.


Note:

If the Null indicator (//) alone coded in the Job, then it will treat as End of the JOB.


Example:

Simple JCL to explain different JCL statements.


=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000001 //MTHUSERR JOB (META007),'PAWAN Y',CLASS=A,MSGCLASS=L,MSGLEVEL=(1,1),   
000002 //             TIME=1440,NOTIFY=&SYSUID                                 
000003 //*                                                                     
000004 //JOBLIB   DD  DSN=MTHUSER.MY.LOADLIB,DISP=SHR                          
000005 //*                                                                     
000006 //*        EXAMPORG RUNNING STEP                                        
000007 //*                                                                     
000008 //STEP01  EXEC PGM=EXAMPROG                                             
000009 //STEPLIB  DD  DSN=MTHUSER.TEST.LOADLIB,DISP=SHR                        
000010 //INPFILE  DD  DSN=MTHUSER.EXAMPROG.INPUT,DISP=SHR                      
000011 //OUTFILE  DD  DSN=MTHUSER.EXAMPROG.OUTPUT,                             
000012 //             DISP=(NEW,CATLG,DELETE),                                 
000013 //             UNIT=(SYSDA,20),                                         
000014 //             SPACE=(CYL,(50,25)),                                     
000015 //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,BUFNO=2)                
000016 //*                                                                     
000017 //SYSPRINT DD  SYSOUT=*                                                 
000018 //SYSUDUMP DD  SYSOUT=*                                                 
000019 //SYSOUT   DD  SYSOUT=*                                                 
****** **************************** Bottom of Data ****************************


JCL Introduction JCL Structure

Advertisements