Sample RUN JCL for COBOL Program

Sample RUN JCL for a COBOL Program – In Mainframes area any batch COBOL program needs to have its corresponding JCL to run it without which it can not be executed. As we know JCL is a JOb Control Language which is used to run and control the execution of the programs. So JOB written in JCL is must to execute any batch COBOL program, The job used to run it is called a RUN JCL. Below example shows a sample Run JCL for a  program named ‘CUSTR001’.  CUSTR001  is developed to have one input file and it generates one output file using the input file records. As it uses two files, these files should also be be specified in the RUn JCL.

First two line of the JOB are called JOB card and more information on the job card can be found at JCL JOB Card


  • CUSTJB01 –> This is the JOB name, It can be be any name but should be limited to 8 char length.
  • JOB             –> It is a Keyword parameter and is must to specify.
  • STEP01       –> This is the STEP Name which can be any name like CUST01, RPT01 etc. The point here is, no need to include the word STEP in the  stepname. There can be many steps in a JOB and each step can execute a Program.
  • EXEC PGM –> This is the place where the program that needs to executed should be given.
  • STEPLIB     –> Here load Libraries should be specified, It can be one or more than one. If more than one load libraries are specified, then the OS searches all the specified load libraries in the order they are given  and Once it finds in one of them it stops searching for it further.
  • CUSTIN      –> This is the input file. Relationship between COBOL file and this JCL file is established in the COBOL FILE CONTROL area.
  • CUSTOUT  –> Output file name. As it is a New file, it should be specified with DISP, SPACE and DCB details.
  • SYSPRINT and SYSOUT are used to display the messages that gets generated while running.


  1. By Higinio


  2. By Higinio


Leave a Reply

Your email address will not be published. Required fields are marked *