jclb unit 1
TRANSCRIPT
-
8/21/2019 JCLb Unit 1
1/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed.
-
8/21/2019 JCLb Unit 1
2/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2 o% &'
Course Details
Audience
(hi" )o*r"e i" de"igned %or intermediate to ad#an)ed JCL "y"tem programmer", operator" and app!i)ation
programmer" +ho ha#e "ome no+!edge o% -a"i) JCL )oding.
Prerequisites
(hi" )o*r"e a""*me" that the "t*dent ha" the -a"i) no+!edge o% IS te)hno!ogie", data pro)e""ing, "o%t+are
and hard+are %rom OS/'0 Introd*)tion '013, OS/'0 MVS Con)ept" and a)i!itie" '0123 and OS/'0
JCL Introd*)tion '01'3 )o*r"e".
Introd*)tion
-
8/21/2019 JCLb Unit 1
3/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age ' o% &'
Course Introduction
(he %ir"t *nit, Using Special DD Statements, di")*""e" "pe)ia! 55 "tatement" that )an e6tend a
programmer7" )apa-i!itie" and a#oid repetiti#e )oding.
(he Introducing Procedure *nit introd*)e" pro)ed*re", pre8)oded JCL that yo* )an -ring into a 9o- "tream
at the appropriate point to per%orm a parti)*!ar %*n)tion.
In the third *nit, Modifying EXEC Parameters, yo* !earn ho+ to modi%y operand" on pro)ed*re :;:C
"tatement" at the time o% in#oing a pro)ed*re.
(he Modifying DD Parameters *nit e6tend" the "i!!" de#e!oped in the third *nit, -y di")*""ing ho+ to add,
o#erride or n*!!i%y operand" on pro)ed*re 55 "tatement".
In the %i%th *nit, Determining the Effective C!, yo* !earn ho+ to ana!yze the e%%e)ti#e JCL.
(he %ina! *nit, Sym"olic Parameters, di")*""e" ho+ to a""ign #a!*e" to 55
-
8/21/2019 JCLb Unit 1
4/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4 o% &'
t the end o% thi" )o*r"e, yo* +i!! -e a-!e to=
• >"e -a)+ard re%eren)e %eat*re +ith the $?M, 5S
-
8/21/2019 JCLb Unit 1
5/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1 o% &'
>"ing Spe)ia! 55 Statement"
>"ing Ba)+ard Ae%eren)e
Con)atenating 5ata Set"
5*mmy 5ata Set"
Storage 5*mp"
(opi)"=
-
8/21/2019 JCLb Unit 1
6/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
(hi" *nit de")ri-e" the p*rpo"e, %*n)tion and the %ormat o% )ertain "pe)ia! 55 "tatement" !ie -a)+ard
re%eren)e".
(hi" *nit a!"o de")ri-e" 55 "tatement" that )an -e *"ed to )on)atenate data "et" and identi%y d*mmy data
"et".
55 "tatement" that re@*e"t "torage d*mp" are a!"o di")*""ed in thi" *nit.
Unit Introduction
Unit: Using Special DD Statements
Introd*)tion
-
8/21/2019 JCLb Unit 1
7/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age & o% &'
t the end o% thi" *nit, yo* +i!! -e a-!e to=
• Code a 55 "tatement to *"e in%ormation %rom pre)edingJCL "tatement"
• Identi%y the p*rpo"e o% data "et )on)atenation
• Code JCL to )on)atenate a data "et
• Code a 55 "tatement to indi)ate that a data "et i" to -eignored %or the )*rrent program e6e)*tion
• Identi%y the p*rpo"e o% "pe)ia! ddname"
Unit #"$ectives
Unit: Using Special DD Statements
Introd*)tion
-
8/21/2019 JCLb Unit 1
8/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
>"ing Spe)ia! 55 Statement"
>"ing Ba)+ard Ae%eren)e
Con)atenating 5ata Set"
5*mmy 5ata Set"
Storage 5*mp"
(opi)"=
-
8/21/2019 JCLb Unit 1
9/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
t the end o% thi" topi), yo* +i!! -e a-!e to=
• 5e%ine a -a)+ard re%eren)e
• Identi%y %o*r )ommon -a)+ard re%eren)e"
• :6p!ain the importan)e o% ea)h o% the -a)+ardre%eren)e"
%opic #"$ectives
Unit: Using Special DD Statements Topic: Using Backward Reference
Introd*)tion
-
8/21/2019 JCLb Unit 1
10/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 0 o% &'
&hat is 'ac()ard *eference+
typi)a! JCL 9o- "tep may *"e or )reate a
n*m-er o% data "et", ea)h re@*iring a #ariety o%
parameter #a!*e".
Ba)+ard re%eren)e i" a )oding te)hni@*e that
dire)t" the "y"tem to )opy parameter #a!*e" %rom
pre)eding 55 "tatement" +ithin the )*rrent 9o-.
,o) does this technique help+
Ba)+ard re%eren)e te)hni@*e i" more e%%i)ienta"
it "a#e" the programmer %rom repetiti#e )oding o%
in%ormation.
'ac()ard *eference
Unit: Using Special DD Statements Topic: Using Backward Reference
55 $AM:(:AS
$?M VOL
5S< 5CB
Con)ept"
-
8/21/2019 JCLb Unit 1
11/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
o*r )ommon -a)+ard re%eren)e" are=
• $?M Ae%eren)e= $oint" to a pre#io*" data "et to "pe)i%y a program name
• 5S< Ae%eren)e= $oint" to a pre#io*" data "et name
• VOL Ae%eren)e= $oint" to a pre#io*" #o!*me "eria! n*m-er
• 5CB Ae%eren)e= $oint" to 5CB attri-*te" de%ined in another pre#io*" 55 "tatement
%ypes of 'ac()ard *eferences
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
12/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2 o% &'
Synta- for 'ac()ard *eference
(he genera! %orm o% a -a)+ard re%eren)e i" a"
%o!!o+"=
• (o re%er -a) to a prior 55 "tatement
+ithin the "ame 9o- "tep=
Keyword=*.ddname
• (o re%er -a) to a 55 "tatement in a
prior 9o- "tep=
Keyword=*.stepname.ddname
• (o re%er -a) to a 55 "tatement
)ontained in a )ata!oged pro)ed*re
)a!!ed -y a pre#io*" "tep=
Keyword=*.stepname.procstep.
ddname
(he ey+ord in ea)h "tatement i" either
$?M, 5S
-
8/21/2019 JCLb Unit 1
13/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age ' o% &'
%he general form of a "ac()ard r eference to a DD statement in a previous $o" step is
.ey)ord /00000000000001
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
14/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4 o% &'
Match the "ac()ard reference )ith the parameter to )hich it points1
. $?M re%eren)e . pre#io*" #o!*me "eria! n*m-er
2. 5S< re%eren)e B. pre#io*" data "et "pe)i%ying a program name
'. VOL re%eren)e C. 5CB attri-*te" de%ined in a pre#io*" 55 "tatement
4. 5CB re%eren)e 5. pre#io*" data "et name
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
15/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1 o% &'
P2M 'ac()ard *eference
&hat is P2M 'ac()ard *eference+
$?M -a)+ard re%eren)e i" a )oding te)hni@*e that point" to a prior 55 "tatement +hi)h "pe)i%ie" a
mem-er o% a program !i-rary.
,o) does this technique help+
$?M -a)+ard re%eren)e i" *"e%*! in a program de#e!opment en#ironment, in +hi)h the o*tp*t %rom one
9o- "tep typi)a!!y a !inage edit "tep3 may -e)ome the program to e6e)*te in a "*-"e@*ent "tep. In "*)h a
)a"e, in"tead o% naming the program, yo* )an )ode a $?M -a)+ard re%eren)e.
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
16/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
(he genera! %orm o% a $?M -a)+ard re%eren)e i" a" %o!!o+"=
//STEP EXEC P$%=*.stepname.ddname
Synta- for P2M 'ac()ard *eference
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
17/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age & o% &'
$?M -a)+ard re%eren)e i" o%ten *"ed %o!!o+ing a !inage edit "tep, in +hi)h a !oad mod*!e program3 i"
"tored in a temporary data "et. $?M -a)+ard re%eren)e i" *"ed in )oding a !ater "tep that e6e)*te" the
program. (he re%eren)e "pe)i%ie" the data "et )ontaining the program %rom the pre#io*" "tep.
P2M 'ac()ard *eference 3 E-ample 4
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
18/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
P2M 'ac()ard *eference 3 E-ample 5
In the e6amp!e "ho+n, the LI
-
8/21/2019 JCLb Unit 1
19/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
Assume that in step C of a $o"6 you )ant to e-ecute P*#2' using a P2M "ac()ard reference1%he program is specified in S%EPA on a DD statement )ith ddname !.ED#U%1 Complete thefollo)ing code1
//STEPC EXEC P$%= GGGGGGGGGGGGGGG
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
20/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 20 o% &'
&hich of the follo)ing statements are true for a P2M "ac()ard reference+
. It i" )oded on 55 "tatement.
B. It o%ten %o!!o+" a LI
-
8/21/2019 JCLb Unit 1
21/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2 o% &'
&hat is DS7 'ac()ard *eference+
(he 5S< -a)+ard re%eren)e i" a )oding te)hni@*e that re%er" to a prior 55 "tatement that name" the
data "et yo* +ant to pro)e"".
,o) does this technique help+
(hi" te)hni@*e i" *"e%*! +hen )oding 9o-" that )on"i"t o% "e#era! "tep", +ith m*!tip!e re%eren)e" to the "ame
data "et. (he re%eren)e )an a!"o -e *"ed to retrie#e temporary data "et" in "*-"e@*ent 9o- "tep", +itho*t
no+ing the name.
DS7 'ac()ard *eference
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
22/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 22 o% &'
(he genera! %orm %or the 5S< -a)+ard re%eren)e i" a" %o!!o+"=
DS=*.stepname.ddname
Synta- for DS7 'ac()ard *eference
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
23/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2' o% &'
DS7 'ac()ard *eference 3 An E-ample
Con"ider a payro!! 9o- )on"i"ting o% "e#era! "tep",
a!! re%erring to the "ame data "et. (he 9o- need"
to -e e6e)*ted ea)h +ee *"ing a data "et that
)ontain" the +ee7" tran"a)tion".
(hi" re@*ire" that, ea)h +ee the data "et name
m*"t -e )hanged in the order F::, F::2and "o on.
By *"ing a 5S< -a)+ard re%eren)e, the data "et
)an -e retrie#ed ea)h +ee -y )hanging on!y one
55 "tatement, 55.
Contin*edH
Unit: Using Special DD Statements Topic: Using Backward Reference
//STEP1 EXEC P$%=PO$1
//DD1 DD 'T=S(SD!,
// 2O&=SE=P!CK1".SP!CE=3,",","++,
// D'SP=E-,P!SS+,DS=-EEK1
//STEP" EXEC P$%=PO$"
//DD" DD DS=*.STEP1.DD1.D'SP=O&D,KEEP+
Con)ept"
-
8/21/2019 JCLb Unit 1
24/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 24 o% &'
A DS7 "ac()ard reference points to a 000000000 in a prior DD statement1
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
25/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 21 o% &'
Code a DS7 "ac()ard reference that refers to a data set in S%EP56 ddname 8DD9:1
DS= 44444444444444
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
26/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2 o% &'
&hat is ;#! 'ac()ard *eference+
VOL -a)+ard re%eren)e i" a )oding te)hni@*e that point" to the #o!*me "eria! n*m-er o% an e6i"ting
data "et.
,o) does this technique help+
(he VOL -a)+ard re%eren)e i" *"e%*! +hen yo* +ant to )reate a ne+ data "et on the "ame #o!*me on
+hi)h an e6i"ting data "et re"ide", -*t yo* do not no+ the #o!*me identi%i)ation.
;#! 'ac()ard *eference
(he VOL parameter "pe)i%ie" the media
#o!*me on +hi)h a data "et re"ide".
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
27/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2& o% &'
(he genera! %orm o% the VOL -a)+ard re%eren)e i" "ho+n -e!o+=
//ddname DD 52O&=E6=dsname
Synta- for ;#! 'ac()ard *eference
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
28/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2 o% &'
Con"ider an e6amp!e +here $AO? )reate" and )ata!og" a data "et named ;D. ;D i" to re"ide on the
"ame #o!*me a" an e6i"ting, pre#io*"!y )ata!og*ed data "et named BC.
(o re%er the "y"tem to data "et BC, a VOL -a)+ard re%eren)e )an -e )oded a" %o!!o+"=
//STEP1 EXEC P$%=PO$!
//DD1 DD DS=X(7,
// D'SP=E-,C!T&$+,
// 2O&=E6=!BC
;#! 'ac()ard *eference 3 E-ample 4
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
-
8/21/2019 JCLb Unit 1
29/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2 o% &'
;#! 'ac()ard *eference < E-ample 5
In thi" e6amp!e the -a)+ard re%eren)e re%er" to a
"pe)i%i) #o!*me "eria! n*m-er )oded on a prior
55 "tatement.
(he data "et ;D +i!! -e )reated on the #o!*me
re%erred to -y the 55 "tatement 552 #o!*me
2'413.
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
//STEP! EXEC P$%=PO$!
//DD" DD DS=!BC,2O&=SE=1"#089,
// D'SP=S:,'T=S(SD!
//DD1 DD DS=X(7,
// D'SP=E-,C!T&$+,
// 2O&=E6=*.DD",5
-
8/21/2019 JCLb Unit 1
30/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age '0 o% &'
Code a ;#! "ac()ard reference )hen=
data set XXX )ill reside on the same volume as data set >>>1
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
31/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age ' o% &'
Code a ;#! "ac()ard reference )hen=
data set XXX )ill "e created on the volume identified in the DD statement )ith ddname DD41
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
32/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age '2 o% &'
Code a ;#! "ac()ard reference )hen=
data set XXX )ill "e created on the volume identified in S%EPC as DD51
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
33/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age '' o% &'
Match the underlined statements in the code )ith the definitions in the column on the right1
. VOLA:LM< . "tepname.ddname
2. VOLA:K.55 B. d"name
'. VOLA:K.S(:$.55 C. ddname
Are &e on %rac(+
Unit: Using Special DD Statements Topic: Using Backward Reference
Ae#ie+
-
8/21/2019 JCLb Unit 1
34/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age '4 o% &'
&hat is DC' 'ac()ard *eference+
5CB -a)+ard re%eren)e i" a )oding te)hni@*e that a!!o+" yo* to )opy a !i"t o% attri-*te" %rom a prior 55
"tatement in the "ame or pre#io*" 9o- "tep.
,o) does this technique help+
(hi" )oding te)hni@*e )an -e *"ed to en"*re that the 5CB parameter" are )on"i"tent +ithin the 9o-.
It )an a!"o -e *"ed to o#erride or add to the "*-parameter" )oded on a pre#io*" "tatement.
DC' 'ac()ard *eference
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
/OS MVS JCL I di
-
8/21/2019 JCLb Unit 1
35/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age '1 o% &'
(he genera! %orm i" a" %o!!o+"=
//ddname DD DCB=*.stepname.ddname
Synta- for DC' 'ac()ard *eference
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
/OS MVS JCL I t di t
-
8/21/2019 JCLb Unit 1
36/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age ' o% &'
DC' 'ac()ard *eference 3 An E-ample
""*me that in S(:$2 yo* +ant to )reate adata "et +ith the "ame parameter" a" a data "et
in S(:$.
(he )ode "ho+n en"*re" that the attri-*te" on the
552 "tatement are the "ame a" tho"e on the 55
"tatement.
Unit: Using Special DD Statements Topic: Using Backward Reference
//STEP1 EXEC P$%=PO$1
//DD1 DD DCB=EC6%=6B,
// &EC&=3,
// B&KS'7E=3+...
//STEP" EXEC P$%=PO$" //DD" DD DCB=*STEP1.DD1,...
Con)ept"
/OS MVS JCL I t di t
-
8/21/2019 JCLb Unit 1
37/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age '& o% &'
5CB -a)+ard re%eren)e )an a!"o -e *"ed too#erride or add to the "*-parameter" )oded on a
pre#io*" "tatement.
(he %ormat %or o#erriding a pre#io*" "tatement
i" a" %o!!o+"=
DCB=*.stepname.ddname,;
attr
-
8/21/2019 JCLb Unit 1
38/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age ' o% &'
or e6amp!e, noti)e the 5CB )hara)teri"ti)" in"tatement 55 -e!o+=
//STEP# EXEC P$%=PO$#
//DD1 DD DCB=EC6%=6,
// B&KS'7E=3+,5
(he %o!!o+ing o#erride "tatement=
//DD" DD DCB=*.DD1,
// EC6%=6B,&EC&=3+
+o*!d re"*!t in the"e 5CB )hara)teri"ti)"=
//DD" DD DCB=EC6%=6B,
// &EC&=3,B&KS'7E=3+
DC' 'ac()ard *eference 3 #verriding 8cont?d:
Unit: Using Special DD Statements Topic: Using Backward Reference
Con)ept"
5CBA:CMB,
LA:CL0
BLSI:003
5CBA:CM,
BLSI:003
/OS MVS JCL I t di t
-
8/21/2019 JCLb Unit 1
39/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age ' o% &'
%he portion of the $o" stream sho)n a"ove contains C! statements6 some of )hich areincomplete1
Complete those statements "y coding the appropriate "ac()ard references as follo)s=
%he data set name in statement @ refers to statement 51
Are &e on %rac(+
Ae#ie+
1. //CO%P'&E EXEC P$%=P&1
". //CO%POT DD 'T=S(SD!,2O&=SE=P!CK1",
// D'SP=E-,P!SS+,DS=))!#. //&KED EXEC P$%=&'KED'T
0. //&KED' DD D'SP=O&D,DS=4444444444
8. //S(S&%OD DD D'SP=E-,P!SS+,DS=))$OSET$O+,
// 2O&=44444444444444
9. //$O EXEC P$%=44444444444
A. //%(D!T! DD DS=%(D!T!,D'SP=E-,C!T&$+,
// 2O&=SE SP!CE=3,8+,
// DCB=EC6%=6B,&EC&=3,B&KS'7E=3+3. //TE%P DD 'T=S(SD!,DCB=44444444444
Unit: Using Special DD Statements Topic: Using Backward Reference
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
40/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 40 o% &'
%he portion of the $o" stream sho)n a"ove contains C! statements6 some of )hich areincomplete1
Complete those statements "y coding the appropriate "ac()ard references as follo)s=
%he volume in statement refers to statement 51
Are &e on %rac(+
Ae#ie+
Unit: Using Special DD Statements Topic: Using Backward Reference
1. //CO%P'&E EXEC P$%=P&1
". //CO%POT DD 'T=S(SD!,2O&=SE=P!CK1",
// D'SP=E-,P!SS+,DS=))!#. //&KED EXEC P$%=&'KED'T
0. //&KED' DD D'SP=O&D,DS=*.CO%P'&E.CO%POT
8. //S(S&%OD DD D'SP=E-,P!SS+,DS=))$OSET$O+,
// 2O&=44444444444444
9. //$O EXEC P$%=44444444444
A. //%(D!T! DD DS=%(D!T!,D'SP=E-,C!T&$+,
// 2O&=SE SP!CE=3,8+,
// DCB=EC6%=6B,&EC&=3,B&KS'7E=3+3. //TE%P DD 'T=S(SD!,DCB=44444444444
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
41/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4 o% &'
%he portion of the $o" stream sho)n a"ove contains C! statements6 some of )hich areincomplete1
Complete those statements "y coding the appropriate "ac()ard references as follo)s=
%he program in statement B refers to statement 1
Are &e on %rac(+
Ae#ie+
Unit: Using Special DD Statements Topic: Using Backward Reference
1. //CO%P'&E EXEC P$%=P&1
". //CO%POT DD 'T=S(SD!,2O&=SE=P!CK1",
// D'SP=E-,P!SS+,DS=))!#. //&KED EXEC P$%=&'KED'T
0. //&KED' DD D'SP=O&D,DS=*.CO%P'&E.CO%POT
8. //S(S&%OD DD D'SP=E-,P!SS+,DS=))$OSET$O+,
// 2O&=E6=*.CO%P'&E.CO%POT
9. //$O EXEC P$%=44444444444
A. //%(D!T! DD DS=%(D!T!,D'SP=E-,C!T&$+,
// 2O&=SE SP!CE=3,8+,
// DCB=EC6%=6B,&EC&=3,B&KS'7E=3+3. //TE%P DD 'T=S(SD!,DCB=44444444444
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
42/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 42 o% &'
%he portion of the $o" stream sho)n a"ove contains C! statements6 some of )hich areincomplete1
Complete those statements "y coding the appropriate "ac()ard references as follo)s=
%he DC' attri"utes in statement refer to statement 1
Are &e on %rac(+
Ae#ie+
Unit: Using Special DD Statements Topic: Using Backward Reference
1. //CO%P'&E EXEC P$%=P&1
". //CO%POT DD 'T=S(SD!,2O&=SE=P!CK1",
// D'SP=E-,P!SS+,DS=))!#. //&KED EXEC P$%=&'KED'T
0. //&KED' DD D'SP=O&D,DS=*.CO%P'&E.CO%POT
8. //S(S&%OD DD D'SP=E-,P!SS+,DS=))$OSET$O+,
// 2O&=E6=*.CO%P'&E.CO%POT
9. //$O EXEC P$%=E6=*.&KED.S(S&%OD
A. //%(D!T! DD DS=%(D!T!,D'SP=E-,C!T&$+,
// 2O&=SE SP!CE=3,8+,
// DCB=EC6%=6B,&EC&=3,B&KS'7E=3+3. //TE%P DD 'T=S(SD!,DCB=44444444444
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
43/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4' o% &'
55 Statement JCL "tatement that de")ri-e" ea)h data "et *"ed +ithin a 9o- "tep.
ddname 5ata de%inition name. *ni@*e name gi#en to ea)h data "et *"ed in a 9o- "tep.
Jo- Step (he 9o- )ontro! "tatement" that re@*e"t and )ontro! the e6e)*tion o% a program and
re@*e"t the re"o*r)e" needed to r*n the program. 9o- "tep i" identi%ied -y an
:;:C "tatement.
5ata "et" ny named )o!!e)tion o% data.
$arameter Va!*e" Varia-!e in%ormation that %o!!o+" a ey+ord parameter and an e@*a! "ign.
$?M n :;:C "tatement parameter that name" the program to e6e)*te.
5S< 55 "tatement parameter that name" the data "et.
2lossary
Contin*edH
Unit: Using Special DD Statements Topic: Using Backward Reference
?!o""ary
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
44/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 44 o% &'
VOL parameter on a 55 "tatement that re@*e"t" a "pe)i%i) #o!*me or #o!*me".
5CB 5ata Contro! B!o). parameter on a 55 "tatement that de")ri-e" the attri-*te"
o%
a data "et, "*)h a" -!o) "ize and re)ord %ormat.
Load Mod*!e n e6e)*ta-!e program that re"*!t" %rom a !in edit "tep.
SDSLMO5 55 name *"ed -y the !inage editor to +rite it" o*tp*t a !oad mod*!e or LMO53.
5IS$ 5e")ri-e" the "tat*" o% a data "et to the "y"tem and te!!" the "y"tem +hat to do
+ith
the data "et a%ter termination o% the "tep or 9o-.
2lossary 8cont?d:
Unit: Using Special DD Statements Topic: Using Backward Reference
?!o""ary
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
45/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 41 o% &'
-
8/21/2019 JCLb Unit 1
46/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4 o% &'
>"ing Spe)ia! 55 Statement"
>"ing Ba)+ard Ae%eren)e
Con)atenating 5ata Set"
5*mmy 5ata Set"
Storage 5*mp"
(opi)"=
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
47/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4& o% &'
t the end o% thi" topi), yo* +i!! -e a-!e to=
• 5e%ine data "et )on)atenation
• :6p!ain ho+ to )on)atenate data "et"
%opic #"$ectives
Unit: Using Special DD Statements
Introd*)tion
Topic: Concatenating Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
48/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4 o% &'
&hat is data set concatenation+
programmer )an )ode 55 "tatement" to re@*e"t that "e#era! data "et" -e )on)atenated.
5ata "et )on)atenation ena-!e" the "y"tem to pro)e"" "e#era! "eparate phy"i)a! data "et" a" one !ogi)a!
data "et.
Data Set Concatenation 3 Definition
Unit: Using Special DD Statements
Con)ept"
Topic: Concatenating Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
49/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4 o% &'
Con"ider a )o"t !edger "y"tem to prod*)e amonth!y )o"t "*mmary %i!e. t the year end, it i"
re@*ired to pro)e"" a!! 2 month!y data "et" to
prod*)e an ann*a! report. !! the data "et" are
)on)atenated "o that they )an -e pro)e""ed
"e@*entia!!y.
In thi" e6amp!e, the program *"e" a ddname o%
L:5?:A and the month!y data "et" are named
J
-
8/21/2019 JCLb Unit 1
50/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 10 o% &'
Concatenation of Data Sets
,o) to concatenate data sets+
o!!o+ing "tep" are in#o!#ed in )on)atenating data
"et"=
. Code a "tandard 55 "tatement %or the %ir"t
data "et on!y
2. dd a 55 "tatement +itho*t a ddname %or
ea)h data "et to -e )on)atenated
'. Se@*en)e the "tatement" in the order they
are to -e pro)e""ed
Unit: Using Special DD Statements
Contin*edH
Con)ept"
//ddname DD DS=J!.D!T!
// DD DS=6EB.D!T!
// DD DS=%!.D!T!
Topic: Concatenating Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
51/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1 o% &'
,o) concatenation is useful+
>"ing )on)atenation, a program )an -e r*n +ith one or "e#era! inp*t data "et" -y mere!y )hanging the 55
"tatement.
Fhi!e )on)atenating data "et" the %o!!o+ing point" m*"t -e )on"idered=
• (he )on)atenated data "et" m*"t ha#e the "ame or )ompati-!e3 5CB "*-parameter".
-
8/21/2019 JCLb Unit 1
52/73
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 12 o% &'
(he JCL here "ho+" the )on)atenation o% themonth!y data "et" )on"idered in the L:5?:A
e6amp!e.
(he !a"t data "et )on)atenated to L:5?:A i"
5:C.
(he o))*rren)e o% the ddname S>M indi)ate"
that the data "et CC(.3 i" to -e pro)e""ed
"eparate!y %rom the L:5?:A data "et".
C! for Data Set Concatenation 3 An E-ample
Unit: Using Special DD Statements
//&ED$E DD DS=J!,D'SP=S:// DD DS=6EB,D'SP=S:
.
.
.// DD DS=DEC,D'SP=S:
//S% DD DS=!CCT.1,D'SP=S:
Con)ept"
Topic: Concatenating Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
53/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1' o% &'
Consider three data sets named6 CUS%1,IS%#*>1U!6 CUS%1,IS%#*>1AP* and
CUS%1,IS%#*>1A7 )hich are to "e processed in this order1 %hey are to "e concatenated toCUS%1,IS%#*>1#C%6 to create a master customer list1
Put the follo)ing statements in order1
. // DD DS=CST.:'STO(.!P
B. //%!STCST DD DS=CST.:'STO(.OCT
C. // DD DS=CST.:'STO(.J!
5. // DD DS=CST.:'STO(.J&
Are &e on %rac(+
Unit: Using Special DD Statements
Ae#ie+
Topic: Concatenating Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
54/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 14 o% &'
Con)atenated data "et" 5ata "et" that are "eparate phy"i)a!!y, -*t pro)e""ed "e@*entia!!y a" one !ogi)a! data "et.
ddname 5ata de%inition name. *ni@*e name gi#en to ea)h data "et *"ed in a 9o- "tep.
5CB 5ata Contro! B!o). parameter on a 55 "tatement that de")ri-e" the attri-*te"
o% a data "et, "*)h a" -!o) "ize and re)ord %ormat.
2lossary
Unit: Using Special DD Statements
?!o""ary
Topic: Concatenating Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
55/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 11 o% &'
-
8/21/2019 JCLb Unit 1
56/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1 o% &'
>"ing Spe)ia! 55 Statement"
>"ing Ba)+ard Ae%eren)e
Con)atenating 5ata Set"
5*mmy 5ata Set"
Storage 5*mp"
(opi)"=
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
57/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1& o% &'
t the end o% thi" topi), yo* +i!! -e a-!e to=
• 5e%ine d*mmy data "et"
• 5e")ri-e the importan)e o% d*mmy data "et"
•
Spe)i%y d*mmy data "et" in 55 "tatement"
%opic #"$ectives
Unit: Using Special DD Statements
Introd*)tion
Topic: Dummy Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
58/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1 o% &'
:a)h data "et that i" re%erred -y a program"ho*!d
ha#e a ddname. (he JCL %or the program m*"t
)ontain the )orre"ponding 55 "tatement".
I% a data "et i" not )oded -y a 55 "tatement, then
the program +i!! a-norma!!y end B:
-
8/21/2019 JCLb Unit 1
59/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1 o% &'
&hat is a dummy data set+
d*mmy data "et i" a data "et %or +hi)h a!! Inp*t or O*tp*t I/O3 operation" are -ypa""ed.
"pe)ia! 55 "tatement, 55 5>MMD, i" *"ed to ignore a data "et d*ring the e6e)*tion o% a program.
,o) does it )or(+
Fhen a data "et i" a""igned d*mmy "tat*", a!! I/O operation" are -ypa""ed and de#i)e a!!o)ation, "pa)e
a!!o)ation and data "et di"po"ition are ignored.
Dummy Data Sets
Unit: Using Special DD Statements
Con)ept"
Topic: Dummy Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
60/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 0 o% &'
5*mmy data "et" )an -e "pe)i%ied in 55 "tatement" -y doing one o% the %o!!o+ing=
• Coding 5>MMD a" the %ir"t 55 parameter
Synta6=
//ddname DD D%%(
• Coding 5S
-
8/21/2019 JCLb Unit 1
61/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
Con"ider a payro!! program named $Dthat pro)e""e" "eparate inp*t data "et". (he
ddname (IM:C5S re%er" to +ee!y time )ard"
and the ddname 5J>S( re%er" to ad9*"tment" to
pre#io*" pay period in%ormation.
(he 9o- "tream m*"t in)!*de=
//STEP! EXEC P$%=P!(
//T'%ECDS DD
//!DJST DD
.
. .
Dummy Data Sets 3 An E-ample
Unit: Using Special DD Statements
Con)ept"
Contin*edH
Topic: Dummy Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
62/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 2 o% &'
:#en i% there are no ad9*"tment" %or $D pro)e"", 55 "tatement %or 5J>S( m*"t -e in)!*ded.
(o te!! the "y"tem that there i" no 5J>S( data "et )ode )an -e +ritten a" %o!!o+"=
//STEP! EXEC P$%=P!(
//T'%ECDS DD
//!DJST DD D%%(
I% the data "et de")ri-ed -y the 55 "tatement named 5J>S( i" re%erred to -y the $D program, an
immediate end8o%8%i!e o))*r". (he program +i!! )ontin*e a" i% it ha" pro)e""ed the entire data "et.
Dummy Data Sets 3 An E-ample 8cont?d:
Unit: Using Special DD Statements
Con)ept"
Topic: Dummy Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
63/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age ' o% &'
>ou can specify a dummy data set "y coding DS7/ 000000000000 on the DD statement1
Are &e on %rac(+
Unit: Using Special DD Statements
Ae#ie+
Topic: Dummy Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
64/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 4 o% &'
%he follo)ing C! contains statements to e-ecute a payroll update program called PA>*#!1PA>*#! reads a %*A7S data set for getting time card information and updates the PA>MAS% dataset1 A report of all transactions is created1 %he *EP#*% DD statement descri"es the report dataset1
#rder the follo)ing statements to ignore the report of transactions created "y PA>*#!1
. //%!STE DD DS=P!(%!ST.D'SP=O&D
B. //T!S DD DS=T!S,D'SP=S:
C. //EPOT DD D%%(
5. //STEP1 EXEC P$%=P!(O&
Are &e on %rac(+
Unit: Using Special DD Statements
Ae#ie+
Topic: Dummy Data Sets
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
65/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age 1 o% &'
-
8/21/2019 JCLb Unit 1
66/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
>"ing Spe)ia! 55 Statement"
>"ing Ba)+ard Ae%eren)e
Con)atenating 5ata Set"
5*mmy 5ata Set"
Storage 5*mp"
(opi)"=
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
67/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age & o% &'
t the end o% thi" topi), yo* +i!! -e a-!e to=
• 5e%ine "torage d*mp"
• :6p!ain the ad#antage" and di"ad#antage" o% "toraged*mp"
• Identi%y the "pe)ia! ddname" *"ed in "torage d*mp"
%opic #"$ectives
Unit: Using Special DD Statements
Introd*)tion
Topic: Storage Dumps
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
68/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
&hat are Storage Dumps+
Fhen a program a-norma!!y terminate", "torage
d*mp" are *"ed a" a de-*gging too! to %ind )!*e"
to the )a*"e %or a-norma! ending.
Storage d*mp" are not the mo"t e%%e)ti#ede-*gging too!.
(he main dra+-a)" o% "torage d*mp" are=
• (hey are di%%i)*!t to read "in)e they are
printed in he6ade)ima! )ode
• $rinting "torage d*mp" i" time
)on"*ming
Storage Dumps
Unit: Using Special DD Statements
Con)ept"
Topic: Storage Dumps
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
69/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age o% &'
Special DDnames
(he"e re"er#ed ddname" re@*e"t "torage d*mp" in the e#ent that a program terminate" a-norma!!y=
• SDS>5>M$=Ae@*e"t" a %ormatted d*mp o% the pro)e""ing program area. It i" mo"t genera!!y *"ed
%or de-*gging pro-!em program".
• SDSB:M$=Ae@*e"t" an *n%ormatted d*mp o% the pro)e""ing program area and the "y"tem
n*)!e*" in ma)hine8reada-!e %orm. It i" genera!!y dire)ted to tape or to dire)t a))e""
"torage3 to a!!o+ "*-"e@*ent pro)e""ing -y a d*mp ana!y"i" *ti!ity.
Unit: Using Special DD Statements
Con)ept"
Topic: Storage Dumps
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
70/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age &0 o% &'
It i" ne)e""ary to p!an ahead %or a po""i-!e "toraged*mp.
(o o-tain a d*mp, the SDS>5>M$, SDSB:M$ 55 "tatement" m*"t -e )oded in
the JCL %or ea)h 9o- "tep %rom +hi)h a d*mp need"
to -e o-tained.
(he e6amp!e "ho+n *"e" SDS>5>M$ 55 "tatement.
I% S(:$ or S(:$2 terminate" a-norma!!y, the
"y"tem )reate" a d*mp o% the program "torage area.
,andling Storage Dumps
Unit: Using Special DD Statements
//STEP1 EXEC P$%=PO$1
//S(SD%P DD S(SOT=X
//DD1 DD ...
//STEP" EXEC P$%=PO$"
//S(SD%P DD S(SOT=X
Con)ept"
Topic: Storage Dumps
z/OS MVS JCL Intermediate
-
8/21/2019 JCLb Unit 1
71/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age & o% &'
Match the special ddname )ith its function
. SDSB:
-
8/21/2019 JCLb Unit 1
72/73
© Copyright IBM Corp., 2000, 2004. !! right" re"er#ed. $age &2 o% &'
-
8/21/2019 JCLb Unit 1
73/73