JCL Introduction

JCL Tutorial Topics Index JCL Coding Sheet

JCL is an acronym for Job Control language.

Job control language (JCL) is a set of statements.

A JCL statement coded tells the z/OS operating system about the work want to perform.

JCL defining and controlling the program execution to get the desired output based on the input.

JCL statements tell z/OS where to find the input, how to process that input (what programs/utilities to run) and what to do with the resulting output.

JCL is set of steps where each step has a specific task to complete.

JCL executes the program by using input/output files in batch environment.

JCL acts as a bridge between the Operating System (z/OS) and program.

JCL may contain more than one step and up to 255 steps.

JCL at max contains 255 steps. If the steps to execute are more than 255, then two JCLs required for completing the task.

All jobs use three JCL statements:

  1. One JOB statement
  2. One or more EXEC statements
  3. One or more DD statements

We will discuss about these three in the further chapters.

JCL must begin with ‘//’ in the first two columns continued by JCL statements.

JCL must end with’//’.

Sample list of things that can do with JCL:

  • Compile COBOL program.
  • Compile COBOL + DB2 program
  • Compile COBOL + DB2 +CICS program
  • Run COBOL program
  • Run COBOL+DB2 program
  • Bind DB2 program
  • Create datasets. i.e. PS and PDS.
  • Create GDG’s and VSAM files.
  • Concatenate data from multiple files.
  • Merge data from multiple files.
  • Execute the utilities like IEBCOPY, DFSORT, IEBGENER and IDCAMS.
  • Copy data from one file to other.
  • And so on..


Simple JCL to explain different JCL statements.

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

JCL Tutorial Topics Index JCL Coding Sheet