jcl & jes basics
TRANSCRIPT
-
8/3/2019 Jcl & Jes Basics
1/20
Introduction To JCL
JCL - JOB CONTROL LANGUAGE
JCL is a language that directs the operating system in the handling of application programs. It is a means of communication between an
application program and the operating system of the computer.
z/OS uses a job entry subsystem or JES to receive jobs into the system,schedule them for processing, and control their output processing.
Provides specifications necessary to process a job.
Job is a collection of JCL statements that executes one or morerelated programs.
-
8/3/2019 Jcl & Jes Basics
2/20
Purpose of JCL
JCL does the following:
Directs the operating system on what is to be done in terms
of running applications and scheduling resources.
A means for telling operating system:Who you are (allows priority distinctions)Space and time requirementsThe programs to executeThe Input/output data sets are needed by programs
-
8/3/2019 Jcl & Jes Basics
3/20
Jobstream, Jobs, and Job Steps
JOBSTREAM:A set of JOBS that are run by the computer one after another .
JOB:A set of one or more tasks that are run in sequence.
JOB STEP:Each program executed by a JOB.
-
8/3/2019 Jcl & Jes Basics
4/20
What is JES?
A Job Entry Subsystem Manages I/O Job Queues and Data:
Receiving Jobs Into The O/S
Schedule for ProcessingControlling Output Processing
Versions Of JES:JES2 and JES3
-
8/3/2019 Jcl & Jes Basics
5/20
General JCL Rules
Must begin with // (except for the /* statement) in columns 1and 2.Is case-sensitive (lower-case is just not permitted).
NAME field is optional.Must begin in column 3 if used.Must code one or more blanks if omitted.OPERATION field must begin on or before column 16.
OPERATION field stands alone.OPERANDS must end before column 72.OPERANDS are separated by commas.All fields, except for the operands, must be separated by oneblank.
-
8/3/2019 Jcl & Jes Basics
6/20
Basic JCL Statements
The three basic JCL statements are:JOBEXEC
DD
-
8/3/2019 Jcl & Jes Basics
7/20
Structure of JCL Statements
Each JCL statement is divided into several fields like[Identifier], [Name], [Operation], [Parameters], and[Comments].
Identifier Field:Identifies a record as a JCL statement.Occupies first two character positions:
// -: Usual JCL statement//* -: Comment statement/* -: Delimiter statement
-
8/3/2019 Jcl & Jes Basics
8/20
Structure of JCL Statements
Nam e Field:Must begin in column three.Consists of one to eight characters, which may be letters,
numbers or national characters (#,@, and $).
Operation Field:The three different operation fields are:
JOBEXECDD
-
8/3/2019 Jcl & Jes Basics
9/20
Structure of JCL Statements
Pa r am eters Field:
Begins at least one position after the end of the operation
field and can extend up to column 71.
Individual parameters are separated by commas.
Two types of parameters are:Po siti o na l: Must occ ur in spe cifi c positi o n.Keyw o rd : M a y no t be in spe cifi c po siti on.
-
8/3/2019 Jcl & Jes Basics
10/20
Format of a JCL statement
-
8/3/2019 Jcl & Jes Basics
11/20
JOB Statement Parameters
CLASS : Tells to OS about the nature of job:CLASS=jobclass [Here jobclass:A-Z,0-9]
MSGCLASS : Determines the output device to which written.MSGCLASS=class [Here class:A-Z,0-9]
NOT IFY:Specifies the userid to which the message has to be
sent upon Job completion.NOTIFY = userid
-
8/3/2019 Jcl & Jes Basics
12/20
EXEC Statement Syntax
-
8/3/2019 Jcl & Jes Basics
13/20
EXEC Statement Parameters
PG M: S pe cify the Pr og r am t o be exe cuted:PGM=program-name
PRO C : S pe cify the ca t a l og ued o r In-stre am Pr oc edure t o exe cute:
PROC=Procedure-nameP A RM: S pe cify the input p a r am eters t o the pr og r am :
PARM=(parm1,parm2, )
-
8/3/2019 Jcl & Jes Basics
14/20
EXEC Statement Examples
An EXEC that executes program PAY5B10 in step PAYLIST://PAYLIST EXEC PGM=PAY5B10
An EXEC that passes a parameter value of LINECT=0050 toprogram IEBDG:
//DATAGEN EXEC PGM=IEBDG,PARM='LINECT=0050
An EXEC statement passing three parameters to programHEWL:
//LINKED EXEC PGM=HEWL,PARM='LET,MAP,XREF'
-
8/3/2019 Jcl & Jes Basics
15/20
DD Statement Syntax
-
8/3/2019 Jcl & Jes Basics
16/20
DD Statement Parameters
D S N A ME: Nam es the d a t a set:{DSNAME}=dataset-name{DSN}={data-set-name(member)}
U N IT : Requests a ll oc a ti on t o a spe cifi c devi ce, a type o r a g r oup o f devi ces:
UNIT=device-name/device-type/device-number
V O LU ME/ V O L: Identifies the v o lum es o n whi ch the d a t a set resides o r will reside:
VOL=SER=serial-number
-
8/3/2019 Jcl & Jes Basics
17/20
DD Statement Parameters
SPACE: Requests space for a new dataset on the DASD:
SPACE=({TRK, } (primary-qty [,second-qty] [,directory])[,RLSE] [,CONTIG] [,ROUND] ){CYL, } [, ] [,index ]
[, ] [,MXIG ]{blklgth,} [,ALX ]{reclgth,} [, ]DCB: Completes information in Data Control Block:
DCB=(option1,option2..)
-
8/3/2019 Jcl & Jes Basics
18/20
DD Statement Parameters
D ISP: T his is the disp ositi o n p a r am eter th a t spe cifies wh a t a cti o n needs t o be t ak en o n a d a t a set o n d a t a set on n o r ma l a nd a bn o r ma l ter m ina ti o n.
DISP =(Status,Normal,Abnormal)
S t a tus: T he st a tus o f a d a t a set a t the be g innin g o f j o bNEW,OLD,SHR,MOD
N o r ma l: S pe cifies wh a t t o d o with the d a t a set if the pr og r am ter m ina tes n o r ma lly:
KEEP,PASS,DELETE,CATLGA bn o r ma l: S pe cifies wh a t t o d o with the d a t a set if the
pr og r am ter m ina tes a bn o r ma lly:KEEP,DELETE
-
8/3/2019 Jcl & Jes Basics
19/20
DD Statement Example
A DD statement that allocates an existing data set://INVMAST DD DSNAME=MM01.INVNTORY.MASTER,DISP=SHR
A DD statement that allocates a new data set://INVMAST DD DSNAME=MM01.ACCOUNT.MASTER,DISP=(NEW,CATLG),
// UNIT=SYSDA,VOL=SER=MPS8BV,// SPACE=(CYL,(10,2)),// DCB=(DSORG=PS,RECFM=FB,LRECL=100)
-
8/3/2019 Jcl & Jes Basics
20/20
JCL Basics Info
A JCL member consists of a file of 80-byte, fixed-lengthrecords.The JCL statements are written in positions 1-71.Position 72 is reserved for continuation, a non-space
character indicates the next statement, which will be acontinuation of the current statement.A JCL statement begins with two slashes in positions 1 and 2.Every JCL member must begin with a '"Job Card" that specifies
the job name and other information about how the job willexecute.Each step executes a program or procedure (PROC).The JCL is completed by using '//' in positions 1 and 2 or, when
the last statement is processed.