Professional Documents
Culture Documents
Ibm Mainframes: Job Control Language (JCL) - 01
Ibm Mainframes: Job Control Language (JCL) - 01
1. JOB Statement.
2. EXEC Statement.
3. DD Statement.
4. Null Statement.
▪ EXEC Statement: This statement is used to identify the step name and
program name. A maximum we can write 255 statements in a single
JOB.
▪ Syntax:
▪ //STEP1 EXEC PGM=PROG NAME
Class : These tell about how much time each jobs should run.
Class are divided into executions of certain types from A to z
category .
Depending on installation the grades was given for each class type.
A - 10 min’s the job has to complete
B - 30 min’s
C - 1 hour … O 24 hours…
Why we need so many class because
1) Generating Reports for one year( it may took 14 hours to
generates reports normally speaking reports will took much time.
We have to give class ‘O’ for this job)
2) Doing updation /deletion /addtion of records( it may took 1
hour we have to give class ‘C’)
3) Doing some calculation ( it may took 3 to 4 min’s ‘ A ‘)
Key Word Parameters
STATEMENTS
0 = Print only the job statement
1 = print all JCL statements including statements from cataloged
procedures
2 = Print only the input JCL
MESSAGES
0 = Print system messages only if the job abnormally terminates
1 = Print all system messages every time.
For e.g
TYPRUN=SCAN/HOLD
▪ The TYPRUN parameter allows the operating system
to:
▪ SCAN the JCL for errors. Once the scan is
completed, a JCL listing, containing any errors
found, will be printed. The Job will not be
executed.HOLD – the job is submitted into the
system but will not be executed. The job will
stay in HOLD status until the TYPRUN
parameter is deleted.
Key Word Parameters
// COND=(RC.OPERATOR,STEPNAME),
▪ This parameter is used to either to bypass a particular step or to
execute a particular step.
▪ The Return Code(RC) is a number from 0 through 4095
which is compared to the return code or completion code
issued by a program.
▪ The OPERATOR specifies the type of comparison to be
made: i.e., GT,LT,GE,LE,NE & EQ.
▪ The STEPNAME refers to a particular step to which the RC is
compared.
Key Word Parameters
▪ If the COND is true them the particular step is bypassed and executes when
failed.
▪ We got Two other options here: EVEN and ONLY
▪ EVEN – Specifies that the job step is to be executed if any preceding step
abended and no other RC tests mentioned here are satisfied:
▪ If a RC test is specified here and it’s true, this step is bypassed..
▪ ONLY – Execute this step only if a previous step abended and no RC tests
specified here are satisfied.
▪ COND=ONLY/EVEN
▪ Note: If you don’t code Even or Only, then a previous step that
abends will cause all subsequent steps not to be performed.
Key Word Parameters
TIME=(MM,SS)
▪ The TIME parameter specifies the total amount of CPU time
the job will be allowed to run.
▪ The TIME parameter has 2 subparameters - one
which indicates the number of minutes and one which
indicates the number of seconds the job will be allowed
to run.
▪ We can specify maximum by coding
▪ TIME=NOLIMIT/ MAXIMUM/1440
The EXEC Statement
Most of the system messages you will receive will refer to the
step name. If you give blank step name it will thru blank only.
PGM : Exec statement identifies the program to be executed in
each step.
PARM Parameter