JCL Notes
-
Upload
sravan-reddy-uppula -
Category
Documents
-
view
216 -
download
0
Transcript of JCL Notes
-
7/23/2019 JCL Notes
1/94
JOB CONTROL LANGUAGE
(JCL)Sridhar Babu Purama
-
7/23/2019 JCL Notes
2/94
Introduction about JCL
JCL acts as an interface between Operating System and Programming language.
JCL is the carrier of the program and the data to OS and output from OS.
Uses of JCL :
It is used to compile e!ecute CO"OL programs.
It is used to create delete datasets #P$S PS%& '$'s and (S)* clusters.
It is used to copy data from one dataset to anther dataset.
It is used to sort merge the file data.
+e can compare the files data.
-
7/23/2019 JCL Notes
3/94
JCL has , important statements - JO"& /C and $$ statements
Important statements inJCL
JO"
/C
) JO" can ha0e ma!imum 122 /C statements.
)n /C statement can ha0e ma!imum 122 $$ statements.
/C/C
$$ $$
-
7/23/2019 JCL Notes
4/94
Sample JCL334SS561/ JO" 7)51,8& 89)L98& CL)SS;)& *S'CL)SS;)& *S'L(L;#5&5%& P
-
7/23/2019 JCL Notes
5/94
JCL Coding Sheet
51 #, 5?% #51 52% #5>35D D1% #D, 6?%
33 )* OP
-
7/23/2019 JCL Notes
6/94
)*Parameter is used to identify a JCL statement.
OP
-
7/23/2019 JCL Notes
7/94
JO"LI"
It specifies the load library in which all the Steps' program load modules are referred.
hat is! J"#LI# is applicable to all the steps.
-
7/23/2019 JCL Notes
8/94
Sample JCL334SS561/ JO" 7)51,8& 89)L98& CL)SS;)& *S'CL)SS;)& *S'L(L;#5&5%& P
-
7/23/2019 JCL Notes
9/94
S9PLI"
It specifies the load library in which "$L% a particular SPs program load module is
referred.
hat is! SPLI# is applicable to only a particular the step.
-
7/23/2019 JCL Notes
10/94
Sample JCL334SS561/ JO" 7)51,8& 89)L98& CL)SS;)& *S'CL)SS;)& *S'L(L;#5&5%& P
-
7/23/2019 JCL Notes
11/94
ote
(hen both J"#LI# and SPLI# are specified! then first SPLI# is referred and if load
module is not found! then J"#LI# is referred and if still not found! then System)defined load
libraries are referred and if still not found! abends with S*+, abend code.
S*+, - $o cti/e Load 0odule found.
-
7/23/2019 JCL Notes
12/94
POSI9IO)L Parameters in JO" statement
1. ccounting Information
2. Programmer $ame
Beyword Parameters in JO" statement
1. CLSS
2. P3%
4. 0S5CLSS
6. 0S5L7L
8. $"I9%
,. %P3:$
;. 3S3
*. 35I"$
-
7/23/2019 JCL Notes
13/94
)ccounting Information
It specifies the account code for which billing is done for e>ecuting programs on
0ainframe.
ll the ?ob information i.e.! the CP: time consumed! amount charged! start date &
end date can be seen in JS0S5L5 of SP""L.
Programmer ame : It specifies the coder name who has written the JCL.
!ample :@@9SS1*2A J"# 7)51,8& 89)L98! CLSSB! 0S5CLSSB! 0S5L7LB1!1D
@@9SS1*2A J"# & 89)L98! CLSSB! 0S5CLSSB! 0S5L7LB1!1D
@@9SS1*2A J"# 7)51,8& &CLSSB! 0S5CLSSB! 0S5L7LB1!1D
@@9SS1*2A J"# & &CLSSB! 0S5CLSSB! 0S5L7LB1!1D
-
7/23/2019 JCL Notes
14/94
CL)SS
It categoriEes ?obs based on factors liFe CP: consumption time and CP: resource
utiliEation.
Class can ha/e the range of /alues - G and + - ecution.
ClassB# Job can taFe 1+ min for e>ecution.
ClassBC Job can taFe 1 hour for e>ecution.
ClassB+ Job can utiliEe ma>imum CP: resources.
ClassB1 Job can utiliEe minimum CP: resources.
-
7/23/2019 JCL Notes
15/94
Pecution.
P3% has the range of /alues - + to 18.
he highest the P3% /alue! the first preference it is gi/en for e>ecution.
he Least the P3% /alue! the least preference it is gi/en for e>ecution.
-
7/23/2019 JCL Notes
16/94
ote 5 :(hen two ?obs are submitted! the ?ob which is submitted first is e>ecuted first.
ote 1 :(hen two ?obs are submitted at same time! the ?obs are e>ecuted based on CLSS
parameter.
ote , :(hen two ?obs are submitted at same time and with same CLSS parameter /alue!
then ?obs are e>ecuted based on P3% /alue.
-
7/23/2019 JCL Notes
17/94
MSGCLASS
0S5CLSS specifies the output de/ice to which messages need to be sent.
0S5CLSS can ha/e a range of /alues )G. +)
-
7/23/2019 JCL Notes
18/94
MSGLEVEL
0S5L7L specifies the type of messages to be sent and when they need to be sent.
0S5L7L B S0$S! 0SS5SD
S9)9*9S :Specify the type of JCL statements
+ - "nly J"# statement related messages
1 - ll JCL messages including P3"Cs and System messages 2 - ll JCL messages e>cluding P3"Cs and System messages
*SS)'S :Specify when the messages need to be sent
+ - :pon successful e>ecution of ?ob
1 - :pon successful@unsuccessful e>ecution of ?ob
?
5
1
?
5
$efault 0S5L7LB1!1D
-
7/23/2019 JCL Notes
19/94
TYPRUN
It tells the system what needs to be done to the JCL.
%P3:$BSC$ will ?ust checF the JCL synta> errors.
%P3:$B3:$ will checF the JCL synta> errors and e>ecutes the ?ob.
%P3:$B"L= will checF the JCL synta> errors but Feeps the ?ob on "L= without e>ecuting it.
9o release the Gob on AOL$& specify line command 7a8 in SPOOL.
ow do you checF the JCL synta> errors H J0 @ JSC$ @ 7 as follows H
Command : J*
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA! 0S5L7LB1!1D
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3
@@SP1 A C P50BP3"51
@@SPLI# == =S$B9SS+6,.30S.L"=LI#!=ISPBS3
@@=ISK1 == =S$B9SS161.P"L.9IL!=ISPBS3
@@=ISK2 == =S$B9SS161.J#.9IL!=ISPB$(!CL5!=LD!
@@ =C#BL3CLB18+!#LKSIGB+!3C90B9#D!@@ SPCB3K!1+!8!+D!3LSD
-
7/23/2019 JCL Notes
20/94
NTI!Y
It specifies the :S3 I= to which the S:S $"I9ICI"$ is sent about the successful or
unsuccessful e>ecution of ?ob.
Status $otification can be Fnown by 0a>CC.
(hen 0a>CC B +@6! it indicates successful e>ecution of ?ob.
"ther than +@6! it indicates unsuccessful e>ecution of ?ob.
$"I9%B&S%S:I= will substitute the :S3 I= with which :ser has logged in. So! the status
notification will be sent to the same :ser I=.
Suppose :ser has logged in with 9SS161 and specified $"I9%B9SS162! then Status notificationis sent to 9SS162 but the SP""L information remains with 9SS161.
-
7/23/2019 JCL Notes
21/94
RESTART
3S3 parameters is used to start the ?ob e>ecution from a particular step abended stepD.
Synta! :
-
7/23/2019 JCL Notes
22/94
REGIN
35I"$ parameter specifies the amount of worFspace reuired for a ?ob or steps e>ecution.
35I"$ is specified in Kilo or 0ega #ytes and in "== uantities.
g H 35I"$B80 @ 4K
0a>imum 35I"$ space can be allocated by specifying 35I"$B+K or +0.
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA!
-
7/23/2019 JCL Notes
23/94
TIME
I0 parameter specifies the amount of time to be allocated for a ?ob or steps e>ecution.
I0Bminutes!secondsD
I0B1+!2+D
I0B1+
I0B!2+D
0a>imum I0 can be allocated by specifying I0B166+
I0B $"LI0I
I0B0A
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA!9I*;#5?&,?%
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3
@@SP1 A C P50BP3"51
@@SP2 A C P50BP3"52!9I*;2
@@SP4 A C P50BP3"54
O9 5 : 9I*specified in J"# is applicable to all the steps in the ?ob.O9 1 : 9I* specified in SP is applicable to only that particular step.
O9 , : 9I*specified in both J"# and SP! then /alue specified in J"# o/errides that of
SP.
-
7/23/2019 JCL Notes
24/94
CN"
(hen a ?ob is e>ecuted! all the steps e>ecute irrespecti/e of their pre/ious sterps e>ecute
successfully or unsuccessfully.
C"$= parameter is used to control the e>ecution of steps.
(hen C"$= specified is false! the step e>ecutes.
(hen C"$= specified is true! the step is bypassed.
$ote H C"$= is applicable for all the steps e>cept the first step.
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA!CO$;#@&L9%
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3@@SP1 A C P50BP3"51
@@SP2 A C P50BP3"52!CO$;#6&L%
@@SP4 A C P50BP3"54
O9 5 : CO$specified in J"# is applicable to all the steps e>cept the first step.
O9 1 : CO$ specified in SP is applicable to only that particular step.
O9 , : CO$specified in both J"# and SP! then /alue specified in SP o/errides that of
J"#.
-
7/23/2019 JCL Notes
25/94
CN"
Synta> H
CO$;#Comparison code&
-
7/23/2019 JCL Notes
26/94
CN"
Scenario 1H$e/er e>ecute the step i.e.! e/en the step e>ecutes successfully or unsuccessfully! do
not e>ecute the step.
So! the C"$= specified must be true for all return codes of pre/ious step.
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3
@@SP1 A C P50BP3"51
@@SP2 A C P50BP3"52!CO$;# ? & L%3CO$;# @?H2 & '%
@@SP4 A C P50BP3"54
-
7/23/2019 JCL Notes
27/94
CN"
Scenario 2Hlways e>ecute the step i.e.! e/en the step e>ecutes successfully or unsuccessfully!
always e>ecute the step.
So! the C"$= specified must be false for all return codes of pre/ious step.
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3
@@SP1 A C P50BP3"51
@@SP2 A C P50BP3"52!CO$;# ? & '9%3CO$;# @?H2 & L9%
@@SP4 A C P50BP3"54
-
7/23/2019 JCL Notes
28/94
CN"
Scenario 4H>ecute the step "$L% when the pre/ious step e>ecutes successfully.
So! the C"$= specified must be false for return codes + and 6 only.
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3
@@SP1 A C P50BP3"51
@@SP2 A C P50BP3"52!CO$;# @ & L9%3CO$;# 6 & L%
@@SP4 A C P50BP3"54
-
7/23/2019 JCL Notes
29/94
CN"
Scenario 6H>ecute the step "$L% when the pre/ious step e>ecutes unsuccessfully.
So! the C"$= specified must be false for return codes * to 6+
-
7/23/2019 JCL Notes
30/94
E#EC Statement
Positional Parameters in /C statement :
P50
Beyword Parameters in /C statement :
35I"$
I0
C"$=
P30
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3
@@SP1 A C P50BP3"51!35I"$B4K!I0B8!1+D!C"$=B6!LD!P30B=1
-
7/23/2019 JCL Notes
31/94
PARMPARMparamtr i! u!d to pa!! th data "rom JCL to COBOL# $ can pa!! a ma%imum o"&'' charactr! on#
PAR* paramtr i! !pci+d in th E,EC !tatmnt a! "oo-! .
33S9P5 /C P'*;
-
7/23/2019 JCL Notes
32/94
E#EC Statement
P'*specifies the program name to be e>ecuted.
-
7/23/2019 JCL Notes
33/94
Sample JCL@@9SS1*2A J"# 124! L$! CLSSB! 0S5CLSSB! 0S5L7LB1!1D! P3%B18!
@@ $"I9%B&S%S:I=! 35I"$B,0! I0B4+!1+D! C"$=B6!LD!
@@ %P3:$BSC$! 3S3BSP2
@@J"#LI# == =S$B9SS1*2.L$.L"=LI#1! =ISPBS3
@@SP1 AC P50B3PP50! 35I"$B4K! I0B1+!2+D! C"$=B*!LD! P30B24)+;)2+11
@@SPLI# == =S$B9SS1*2.L$.L"=LI#2! =ISPBS3
@@=ISK1 == =S$B9SS1*2.L$.P"L.9IL! =ISPBS3
33$ISB1 $$ $S;4SS561.9)L9.POL.
-
7/23/2019 JCL Notes
34/94
"" Statement// !tatmnt !pci+! th charactri!tic! o" a data!t#
%e-.ord Parameters in "" statement /"SN
"ISP"C0UNITSPACEVL(SERRETP"E#P"T
-
7/23/2019 JCL Notes
35/94
"SNIt !pci+! th data!t nam#
A data!t nam i! mad o" 2uai+r!3 ach o" ma%imum n1th 4 charactr!#
It can b ma%imum 55 charactr! on1# It can b mad o" aphabtic(A67)3 numric('68)3969
and nationa charactr!(:3;3
-
7/23/2019 JCL Notes
36/94
"SNPS Naming 1on2ention /
ALLST$PMSJ&&'$PMSC&&'$CRE)&34
AL
Usually
ProGect I$
Job ame Copyboo
ame
-
7/23/2019 JCL Notes
37/94
"ISP/ISPo!ition paramtr i! u!d to !pci" th !tatu! o" a data!t and -hat nd! to b donto th data!t upon !ucc!!"u or un!ucc!!"u %cution o" !tp#
Eg / "ISP5*NE67CATLG7"ELETE,
S-nta8 /
"ISP 5 *STATUS7 Normal E8e19tion7 A:normal E8e19tion,
+
SA$
"AS" ( "IRECT ACCESS STRAGE "EVICESYS"A ( SYSTEM "IRECT ACCESS
UNIT 5TAPE stores dataset on TAPE de2i1e$
TAPE is an e8ternal de2i1e made o< magneti1 strips 9sed to ta>e :a1>9p oecution JCL
) JCL :tilities - I#5$3! I#C"P%! I9#316! I=C0S! S"3) P3"C=:3S - I$S30 & CL"5
Sample E8e19tion JCL
-
7/23/2019 JCL Notes
51/94
Sample E8e19tion JCL
@@J"#1 J"# 124!30S!CLSSB!0S5CLSSBA! 0S5L7LB1!1D!CO$;#@&L9%
@@J"#LI# == =S$B9SS+6,.30S.L"=LI#1!=ISPBS3
@@SP1 A C P50BP3"51
@@SPLI# == =S$B9SS+6,.30S.L"=LI#!=ISPBS3@@=ISK1 == =S$B9SS161.P"L.9IL!=ISPBS3
@@=ISK2 == =S$B9SS161.J#.9IL!=ISPB$(!CL5!=LD!
@@ =C#BL3CLB18+!#LKSIGB+!3C90B9#D!
@@ SPCB3K!1+!8!+D!3LSD
@@=ISK4 == =S$B9SS161.JS.9IL!=ISPB$(!CL5!=LD!
@@ =C#BL3CLB18+!#LKSIGB+!3C90B9#D!
@@ SPCB3K!1+!8!+D!3LSD
@@SP2 A C P50B3PP50
@@=ISK1 == =S$B9SS161.J#.9IL!=ISPBS3
@@=ISK2 == =S$B9SS161.J#.3P!=ISPB$(!CL5!=LD!
@@ =C#BL3CLB144!#LKSIGB+!3C90B9#D!
@@ SPCB3K!1+!8!+D!3LSD
@@SP4 A C P50B3PP50!CO$;#@&L9&S9P5%
@@=ISK1 == =S$B9SS161.JS.9IL!=ISPBS3
@@=ISK2 == =S$B9SS161.JS.3P!=ISPB$(!CL5!=LD!
@@ =C#BL3CLB144!#LKSIGB+!3C90B9#D!
@@ SPCB3K!1+!8!+D!3LSD
-
7/23/2019 JCL Notes
52/94
Topic! o" /i!cu!!ion
Stat th main ida! ou9 b ta>in1 about
-
7/23/2019 JCL Notes
53/94
JCL U9ILI9IS
I#5$3
I#C"P%
I9#316
I=C0S
S"3
-
7/23/2019 JCL Notes
54/94
I"'