Professional Documents
Culture Documents
JCL (Jo B Co Ntro L Lan Gua Ge)
JCL (Jo B Co Ntro L Lan Gua Ge)
(
L ol
C
J ntr )
o a ge
C gu
a n
L
• JCL or Job Control Language is used to
communicate with the computer’s operating
system.
• A JOB is a unit of work the computer is to
perform.
• A JOB STREAM consists of JCL
statements, programs that are to be
executed, and data that are to be processed.
The data included in the job stream are
called INPUT STREAM DATA.
JCL statements :-
• JOB statement :- The first statement in a job
stream must be a job statement whose function
is to identify the job to the system.
• EXEC statement :- The job statement is usually
followed by an exec statement. The exec
statement names the program or the procedure
that is to be executed.
• DD statement :- Following the exec statement
are the DD statements (data definition)
statements. The DD statements describe the
data used by the program.
• The other JCL statements are delimiter, null,
comment, proc & pend.
• An EXEC statement and its DD statements
make up a job step.
• A job may consist of any no. of job steps.
• The job, exec & DD statements have a common
format which
is :- //name
operation operand comments
JCL conventions on a Live
Project
• Job executes procedures, procedures have
various steps to execute various programs,
which use parameters and parameter files.
Example JCL :-
Naming conventions :-
Jobs will be held in datasets with .cntl
or .jcl extension
e.g. ORSDEVP.REL#15.JCL
Procedures will be held in datasets
with .proclib or .proc extension
e.g. ORSTEST.REL#15.PROCLIB
Parameters used will be held in datasets
with .parm or .parmlib extensions
e.g ORSLIVE.REL#1.PARMS
Parameters :-
• There are two kinds of parameters in
the operand field :- positional and
keyword parameters.
• The operating system recognizes
positional parameters by their
position in the operand field.
• Keyword parameters can be coded in
any order.
• positional parameters must be coded
in a specific order before any
keyword parameter.
Consider the job statement :-
Positional parameters :- Keyword parameters :-
- e.g.. accounting - e.g.. class & msglevel.
information & - MSGLEVEL=(1,1)
programmers name. indicates print all the input
- accounting information JCL & the JCL from
must precede the catalogued procedures &
programmers name. print all allocation
- if a positional messages.
parameter /sub - TYPRUN=SCAN causes
parameter is omitted a the job’s JCL to be checked
comma must be coded in for syntax errors & prevents
its place. the job from executing.
Controlling step execution -
the COND parameter.
• The COND parameter offers a method of testing the return
codes issued by the previous steps to determine whether a
step will be executed.
• The format of a simplified version of the COND parameter
is COND =(value,operator).
• Value is a no. between 0 and 4095 and operator could be
gt,ge,eq,ne,lt,le.
• The COND parameter causes the value entered to be tested
against the return codes from the previous steps, using the
operator provided.
• If the test condition is true,the step is skipped.If the test
condition is false,the step is executed.
Symbolic parameters :-
• Symbolic parameters offer a convenient way of changing a
procedure to fit your requirement.
• Consider the example procedure-proglod, sysctl, sym,etc.
are all symbolic parameters.
• Symbolic parameter names may consist of from one to
seven alphanumeric or national characters preceded by an
ampersand. The first character however must be
alphabetic / national.
• Exec statement keyword parameters may not be used as
names of symbolic parameters.For e.g.. ®ION. This
restriction does not extend to DD statement keyword
parameters.For e.g. &DSN can be used as symbolic
parameter.
Example procedure :-
Linkage parameter :-
• Linkage parameters are used in COBOL programs.
• Linkage parameters are passed on to the COBOL
programs through JCL by coding ‘parm=‘ parameter
in the exec statement.
• Whenever linkage parameters have to be used,
Linkage section has to be coded in the COBOL
program after the data division and the procedure
division should specify the use of linkage section.
• //DD400S01 EXEC
PGM=DD400900,PARM='&PROCTYPE&DBNME
&DICTNME'
Generation Data Groups(GDG) :-
• A generation data group is a collection,or
group,of cataloged data sets having the same
name and related to one another chronologically.
Each of these datasets is called a generation data
set or,simply, a generation.
• Each generation data set is distinguished by
others by the generation number.
• The main advantage of using a GDG is that the
same JCL can be reused without change.
• Generation group index contains information on
how many generations are to be retained and
what to do when the index gets full.
Defining a generation group
index using IDCAMS :-
• IDCAMS is the name of the access method
services utility program that performs functions
vital to the virtual storage access method(VSAM).
• IDCAMS requires a region of 300K, a SYSPRINT
DD statement for messages and a SYSIN DD
statement for control statements.
• The command format :-DEFINE GDG (PARMS).
Define GDG parameters :-
Parameter Abbrv Meaning
NAME GDD name.
LIMIT LIM The no. Of generations permitted for this gdg.
The max is 255.
EMPTY EMP If empty is specified, all data sets are to be
removed from the index when the limit is
reached.
NOEMPTY NEMP NOEMPTY is the default.