Exforsys.com
 

Sponsored Links

 

MainFrame Tutorials

 
Home Tutorials MainFrame
 

Introduction to JCL

 

Introduction to JCL

Page 1 of 2

Introduction to JCL

This article provides a basic coverage on concepts of MVS/JCL .The topics covered in this article are - Introduction to Job Control language, Basic concepts of JCL, Job & Job steps, Concepts of Job Statements and Positional & Keyword parameters.



JES2/JES3

It is a Batch operating environment. In batch mode we submit or send processing request (JCL) to the system and then we can do some other tasks namely, one can read a book, do some other program etc. Our processing request is put into queue along with the line of other requests submitted by other people. The system will ultimately get around to our request, process it, and return the results to us. Batch mode is generally cheaper than interactive mode. Interactive mode demands a higher level of service from MVS and requires fast response time


JOB Management

MVS uses a JOB entry subsystem (JES) to receive jobs into the operating
system, schedule them for processing by MVS, and to control their output processing. There are two types of JES. They are namely:


  • JES2,
  • JES3

With JES, MVS operates more efficiently


JOB

A JOB is the execution of one or more related programs in sequence. Each
program to be executed by a JOB is called a JOB STEP.


Example:


Suppose you want to process a JOB that executes two programs. The first does sort on the input file and second prints a report. The JCL will have two JOB steps as follows:


//ABCDE JOB ....
//STEP1 EXEC PGM=FIRST_PROGRAM
//FILE1 DD ............
//FILE2 DD ..........
//STEP2 EXEC PGM=SECOND_PROGRAM
//FILE2 DD .........
//OUTFIL DD SYSOUT=*
//*


Job Control Language

JCL is a set of control statements that provide the specifications
necessary to process a JOB. It is the interface between the requirements or instructions in your program and the MVS operating system. Every JOB has three basic JCL statements which are namely:


  • JOB
  • EXEC
  • DD

Without JCL the program will not run on IBM MAINFRAME. So it is like heart of a mainframe.


JCL statements

Following should be followed while writing JCL statement:


  • Columns 1-2 should be always //.
  • Columns 3-10 are the name field. Must be alpha-numeric and should start with alphabet or character ($, #, @). It is Optional field. It must be followed by at least one blank character.
  • Column 12 onwards is the operator field indicating the type of control statement (e.g. JOB, EXEC). Must be preceded and followed by at least one blank.
  • The parameter field follows the operator field and must be preceded and followed by at least one blank character. Contains parameter separated by commas.
  • To continue a parameter on to the next line, insert a non blank character (typically *) in column 72.
  • Comments in JCL begin with //*

Example:


Name Operator Parameter
Field Field Field


//SSB5 JOB USER=PRIYA, PASSWORD=XXXXXX
//MYJOB EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD ……
//SYSUT2 DD SYSOUT=A
………………..
……………….
//* End of JCL Program


In this article let us see the JOB statement in detail


JOB statement

Let us consider the first JCL statement namely the JOB statement. The JOB statement identifies a JOB which is a batch unit of work, to MVS. The JOB statement names the JOB and supplies the necessary information to indicate which resources the JOB will use. A JOB is considered to consist of multiple JOB steps. Each step is made up of an EXEC statement and one or more DD Statements. A JOB is all the JCL statements between a JOB statement and the next JOB statement or null ('// ') statement.


JOB name

It can be 1-8 characters and the first character must be alphabetic or character ($, #, @)


Example:


//ABCDE JOB ............
//BCD$1 JOB .............


Kinds of parameters

There are two kinds of parameters used in this statement namely


  • Positional
  • Keyword

The positional parameters

This parameter has accounting information and programmer name which are explained below:



Accounting information


The Accounting information parameters identify the area that the computer time is to be charged for this JOB. The format of this parameter is installation dependent and it is optional parameter. Parentheses or apostrophes must be used if additional accounting info is coded. Each is separated by commas.


Example:


//* S456 is the accounting information. DEPT7 is the additional information.
//SAMP JOB S456
//SAMP JOB (S456,DEPT7)
//SAMP JOB ‘S456,DEPT7’
//SAMP JOB (S456,’DEPT/MIS’,567)


Next Page: Introduction to JCL - Page 2


Read Next: Mainframes Computers



 

 

Comments


srikantha.s said:

  This is, wholely SHORT n SWEET...
MOST USEFULL DOCUMENT...
November 6, 2008, 11:40 pm

sureshbabu said:

  JCL(Job Control Language) basically which is used to excute the programs in the OS.This is acting like a bridge between os and program.
November 13, 2008, 9:14 am

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape