JCL Structure

JCL Coding Sheet JCL Job Card

Advertisements


JCL structure defines the predefined way of JCL creation.

This chapter we will discuss about JCL structure and the way of JCL creation.

Sample JCL structure shown in the below diagram.


		  JOB
		   |  
		   | 
		  EXEC
		   | 
		   | 
		   DD


Normally, JCL structure mainly contains two major parts.


  1. JOB Card/JOB Statement
  2. JOB Body/JOB Steps

JOB Card:


JOB card is used identify the job or the unit of work the operating system to perform.

JOB card is the first statement to the JOB.

JOB card should always be coded as a first statement in the JOB.

JOB card should be coded only once in the specific JOB.

JOB card is the first control statement in the JOB.

JCL language requires JOB card to identify the particular JOB.

JOB card used to make the OS also aware of the specific JOB after submission.

JOB card started with slashes (‘//’) in the first two positions.

JOB card can be coded in the multiple lines without having the continuation character in the 72th column.

JOB card has the accounting information and job related information.

JOB card has multiple parameters which actually plays a key role in identifying the account information, user information and also providing the information about how to run the particular job.

JOB card parameters can be divided into two types based on their behavior.


  1. Positional parameters.
  2. Keyword parameters.

JOB Card can be explained can be explained detail in further chapters. Use the left navigation for the further chapter details


JOB Body:


Except the JOB Card, remaining part of the JOB is JOB body.

JOB body contains set of steps.

Each step contains one EXEC statement and/or one or more DD statements.

EXEC statement is mandatory for the particular step of JOB Body.

DD statement is optional for the particular step of JOB body.

A step may not contain DD statement if executing a program which does not have any file input or executing a utility.

Comment line also consider as part of JOB body.

A step can contain up to 255 DD statements.

EXEC statement can also contain keyword parameters which will override the keyword parameter values in the JOB card for the specific step.

Every step in the JOB Body can be divided into two parts.


  1. EXEC
  2. DD

EXEC and DD statements can be explained detail in further chapters. Use the left navigation for the further chapter details


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                                 
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 Coding Sheet JCL Job Card

Advertisements