Sunday, 28 July 2013

JCL Tutorial: Mainframe JCL | Job Control Language (JCL) | JCL Example [Basic JCL Concepts].

JCL, JCL Tutorial, Mainframe JCL, JCL Example

JCL- Job Control Language


Welcome back to today's "JCL Tutorial". In this session, you'll learn the fundamentals of Mainframe JCL. You'll go through the type of control statement in JCL and JCL examples for better understanding. Also, what are the different stages of a JCL? 

Let's get started with an introduction to Mainframe.

Agenda - JCL Tutorial.
  • Introduction to Mainframe. 
  • What is JCL stands for?
  • Type of Control Statements in JCL. 
  • Structure of JCL.
  • What are the different stages of JCL?
  • JCL Example.
  • Conclusion. 


Introduction to Mainframe. 

IBM Mainframes which is popularly known as Big Iron is acknowledged for their immense data processing capability. IBM Mainframe process millions of transactions every second. These transactions can be processed either via Online Application (i.e. CICS) or Batch job (i.e. JCL).

The majority of Large enterprise applications still runs on IBM Mainframe.


What is JCL Stands For? 

The term JCL stands for "Job Control Language". It's the command language of the z/OS system. JCL furnishes information related to the programs and data sets that need to be executed. Ideally speaking JCL tells the IBM z/OS system what to do?

A JCL will have multiple steps each step performing a designated task for example: Updating employee payroll data in file. So if you’re working as a mainframe programmer or mainframe operator, then you need to know JCL.

JCL Tip: JCL or Mainframe job or Job Control Language are the terms that are used interchangeably, so don't get confused with these terms. All these terms refer to JCL. 

Type of Control Statement in JCL.

The operator/programmers use JCL to convey program or dataset-related information to z/OS by a set of statements that is known as job control statements. JCL is a blend of the following control statements. 



Let's define each control statement in details: 

  • JOB CARD: The job card defines the name of a job/JCL. A job card include various parameter such as (MSGCLASS, MSGLEVEL). However, not all parameters are mandatory.
  • EXEC Statement: The execute statement provides the name of the program or catalog procedure to be executed. A mainframe job can have 255 steps at max. 
  • DD Statements: The Data definitions statements are used to gives details related to inputs and outputs files which will be used by the program defined on the EXEC statement. 

JCL Tip: A JCL can have 255 steps at max in a single job. 


Structure of JCL. 


JCL structure is fairly simple and based on the above information you can easily recognize different control statements. Let's define the structure of JCL.  

//Job-Name    {JOB}, list of parameters Comments
//Step-Name   {EXEC}
//            {DD}
//*

JCL Tip: Operations can be JOB, EXEC, DD, PROC, and PEND.

What are the different stages of JCL?


Job Control Language Flow
Job Control Language Flow

If you want to get your work done by the z/OS system, then you need to define all relevant details such as programs, data set etc. into a JCL. Let's try to understand the different stages of JCL or the life cycle of JCL. 


The life cycle of JCL is divided into four different phases and each phase has its significance. 


The mainframe operator determines what needs to be done. The operator specifies all required details into a job/JCL (i.e. create a JCL) and submit that job on the mainframe system.


  • JES stands for Job Entry Subsystem. It keeps track of jobs that enter the system, presents them to z/OS for processing, and sends their spooled output to the correct destination. 
  • Conversion Phase - JES2 uses a converter program to analyze each job's JCL statements and queued up jobs for execution. 
  • Processing Phase - The initiator examines the JES spool, selects an appropriate job for execution, executes the job in its address space, and returns to the JES spool for another job.
  • Output Phase - JES2 queues the output for print.

The following diagram illustrates the life cycle of a JCL. 
JCL Tutorial, Stages of JCL, Mainframe JCL
JCL Life Cycle.


JCL Example: 

In the following sample JCL, IDCAM utility will be invoked to execute the LISTCAT command to print details of the dataset.

//TP03TT1 JOB (99834),'MAINFRAME',NOTIFY=&SYSUID
//STEP01   EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
   LISTCAT ENTRIES(TP02.EMPPAY.MAST) –
            VOLUME
/*
JCL Tip: In above mention sample JCL, would execute the LISTCAT command. 

JCL Tutorial - JOB Control Language [Mainframe JCL].



Conclusion.


Finally, this marks an end to today's JCL Tutorial. This tutorial provides an overview of JCL (i.e. JOB Control Language). You learn what are the different types of job control statements in JCL and what is the significance of each control statement. You also get familiar with the different stages of JCLs and the structure of JCL. Lastly, you also code your sample JCL.
►Subscribe to Topictrick & Don't forget to press THE BELL ICON to never miss any updates. Also, Please visit mention the link below to stay connected with Topictrick and the Mainframe forum on -

Youtube
Follow us on Twitter
Facebook
Linkedin
Reddit
Mainframe Blog
Medium Blog

Thank you for your support.
Mainframe Forum™

No comments:

Post a Comment

New In-feed ads