Professional Documents
Culture Documents
Course Details
Audience
This course is designed for intermediate to advanced JCL system programmers, operators and application
programmers who have some knowledge of basic JCL coding.
Prerequisites
This course assumes that the student has the basic knowledge of IS technologies, data processing, software
and hardware from OS/390 Introduction (38051), OS/390 MVS Concepts and Facilities (38052) and OS/390
JCL Introduction (38053) courses.
Introduction
Page 2 of 73
Course Introduction
The first unit, Using Special DD Statements, discusses special DD statements that can extend a
programmers capabilities and avoid repetitive coding.
The Introducing Procedure unit introduces procedures, pre-coded JCL that you can bring into a job stream
at the appropriate point to perform a particular function.
In the third unit, Modifying EXEC Parameters, you learn how to modify operands on procedure EXEC
statements at the time of invoking a procedure.
The Modifying DD Parameters unit extends the skills developed in the third unit, by discussing how to add,
override or nullify operands on procedure DD statements.
In the fifth unit, Determining the Effective JCL, you learn how to analyze the effective JCL.
The final unit, Symbolic Parameters, discusses how to assign values to DDNAME and symbolic parameters,
to build greater flexibility while using procedures.
Introduction
Page 3 of 73
Course Objectives
At the end of this course, you will be able to:
Introduction
Page 4 of 73
UNIT
Page 5 of 73
Introduction
Page 6 of 73
Introduction
Page 7 of 73
UNIT
Page 8 of 73
Topic Objectives
At the end of this topic, you will be able to:
Introduction
Page 9 of 73
Backward Reference
What is Backward Reference?
A typical JCL job step may use or create a
number of data sets, each requiring a variety of
parameter values.
Backward reference is a coding technique that
directs the system to copy parameter values from
preceding DD statements within the current job.
DD PARAMETERS
PGM
VOL
DSN
DCB
Concepts
Page 10 of 73
Concepts
Page 11 of 73
keyword=*.stepname.ddname
Keyword=*.ddname
//JOB1
//STEP1 EXEC
Keyword=*.stepname.ddname
or
//DD1
//DD2
//DD3
DD DSN=ABC
DD DSN=...
DD DSN=*.DD1
Keyword=*.stepname.procstep.
ddname
Page 12 of 73
Are We on Track?
Review
Page 13 of 73
Are We on Track?
Review
1. PGM reference
2. DSN reference
3. VOL reference
4. DCB reference
Page 14 of 73
Concepts
Page 15 of 73
//STEP
Concepts
EXEC PGM=*.stepname.ddname
Page 16 of 73
A PGM backward reference is often used following a linkage edit step, in which a load module (program) is
stored in a temporary data set. PGM backward reference is used in coding a later step that executes the
program. The reference specifies the data set containing the program from the previous step.
Concepts
Page 17 of 73
//LKED
EXEC PGM=LINKEDIT
//SYSLMOD DD
DSN=&&GOSET(GO),
//
DISP=(NEW,PASS),
// UNIT=SYSDA,SPACE=(1024,(200,20,1))
//STEPA
EXEC PGM=*.LKED.SYSLMOD
Concepts
Page 18 of 73
Are We on Track?
Assume that in step C of a job, you want to execute PROGB using a PGM backward reference.
The program is specified in STEPA on a DD statement with ddname LKEDOUT. Complete the
following code.
Review
Page 19 of 73
Are We on Track?
Which of the following statements are true for a PGM backward reference?
A. It is coded on DD statement.
B. It often follows a LINKEDIT step.
C. It points to the DD statement specifying the program you want to execute.
Review
Page 20 of 73
Concepts
Page 21 of 73
DSN=*.stepname.ddname
Concepts
Page 22 of 73
Continued
Concepts
Page 23 of 73
Are We on Track?
Review
Page 24 of 73
Are We on Track?
Code a DSN backward reference that refers to a data set in STEP2, ddname (DD3).
DSN= ______________
Review
Page 25 of 73
Page 26 of 73
//ddname
Concepts
DD
VOL=REF=dsname
Copyright IBM Corp., 2000, 2004. All rights reserved.
Page 27 of 73
//STEP1 EXEC
//DD1
DD
//
//
Concepts
PGM=PROGA
DSN=XYZ,
DISP=(NEW,CATLG),
VOL=REF=ABC
Page 28 of 73
Concepts
//STEPA
//DD2
//
//DD1
//
//
EXEC PGM=PROGA
DD
DSN=ABC,VOL=SER=123456,
DISP=SHR,UNIT=SYSDA
DD
DSN=XYZ,
DISP=(NEW,CATLG),
VOL=REF=*.DD2,
Page 29 of 73
Are We on Track?
Review
Page 30 of 73
Are We on Track?
Review
Page 31 of 73
Are We on Track?
Review
Page 32 of 73
Are We on Track?
Match the underlined statements in the code with the definitions in the column on the right.
Review
1. VOL=REF=LMN
A. stepname.ddname
2. VOL=REF=*.DD1
B. dsname
3. VOL=REF=*.STEP1.DD1
C. ddname
Page 33 of 73
Concepts
Page 34 of 73
//ddname
Concepts
DD DCB=*.stepname.ddname
Page 35 of 73
Concepts
//STEP1
//DD1
//
//
//STEP2
//DD2
EXEC
DD
EXEC
DD
PGM=PROG1
DCB=(RECFM=FB,
LRECL=80,
BLKSIZE=800)...
PGM=PROG2
DCB=*STEP1.DD1,...
Page 36 of 73
DCB=(*.stepname.ddname,list-of
attributes)
The values of the DCB parameters being referred
will be overridden by the values that are being
coded. Any attributes that do not match the DCB
being referred will be added.
Continued
Concepts
Page 37 of 73
//STEP3
//DD1
//
EXEC PGM=PROG3
DD
DCB=(RECFM=F,
BLKSIZE=800),
//DD2
//
DD
DCB=(RECFM=F,
BLKSIZE=800)
DCB=(*.DD1,
RECFM=FB,LRECL=80)
//DD2
//
Concepts
DD
DCB=(RECFM=FB,
LRECL=80,BLKSIZE=800)
DCB=(RECFM=FB,
LRECL=80
BLKSIZE=800)
Page 38 of 73
Are We on Track?
The portion of the job stream shown above contains JCL statements, some of which are
incomplete.
1. //COMPILE EXEC PGM=PL1
2. //COMPOUT DD
UNIT=SYSDA,VOL=SER=PACK12,
//
DISP=(NEW,PASS),DSN=&&A
3. //LKED
EXEC PGM=LINKEDIT
4. //LKEDIN
DD
DISP=OLD,DSN=__________
5. //SYSLMOD DD
DISP=(NEW,PASS),DSN=&&GOSET(GO),
//
VOL=______________
6. //GO
EXEC PGM=___________
7. //MYDATA
DD
DSN=MYDATA,DISP=(NEW,CATLG),
//
VOL=SER SPACE=(800,50),
//
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
8. //TEMP
DD
UNIT=SYSDA,DCB=___________
Complete those statements by coding the appropriate backward references as follows:
The data set name in statement 4 refers to statement 2.
Review
Page 39 of 73
Are We on Track?
The portion of the job stream shown above contains JCL statements, some of which are
incomplete.
1. //COMPILE EXEC PGM=PL1
2. //COMPOUT DD
UNIT=SYSDA,VOL=SER=PACK12,
//
DISP=(NEW,PASS),DSN=&&A
3. //LKED
EXEC PGM=LINKEDIT
4. //LKEDIN
DD
DISP=OLD,DSN=*.COMPILE.COMPOUT
5. //SYSLMOD DD
DISP=(NEW,PASS),DSN=&&GOSET(GO),
//
VOL=______________
6. //GO
EXEC PGM=___________
7. //MYDATA
DD
DSN=MYDATA,DISP=(NEW,CATLG),
//
VOL=SER SPACE=(800,50),
//
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
8. //TEMP
DD
UNIT=SYSDA,DCB=___________
Complete those statements by coding the appropriate backward references as follows:
The volume in statement 5 refers to statement 2.
Review
Page 40 of 73
Are We on Track?
The portion of the job stream shown above contains JCL statements, some of which are
incomplete.
1. //COMPILE EXEC PGM=PL1
2. //COMPOUT DD
UNIT=SYSDA,VOL=SER=PACK12,
//
DISP=(NEW,PASS),DSN=&&A
3. //LKED
EXEC PGM=LINKEDIT
4. //LKEDIN
DD
DISP=OLD,DSN=*.COMPILE.COMPOUT
5. //SYSLMOD DD
DISP=(NEW,PASS),DSN=&&GOSET(GO),
//
VOL=REF=*.COMPILE.COMPOUT
6. //GO
EXEC PGM=___________
7. //MYDATA
DD
DSN=MYDATA,DISP=(NEW,CATLG),
//
VOL=SER SPACE=(800,50),
//
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
8. //TEMP
DD
UNIT=SYSDA,DCB=___________
Complete those statements by coding the appropriate backward references as follows:
The program in statement 6 refers to statement 5.
Review
Page 41 of 73
Are We on Track?
The portion of the job stream shown above contains JCL statements, some of which are
incomplete.
1. //COMPILE EXEC PGM=PL1
2. //COMPOUT DD
UNIT=SYSDA,VOL=SER=PACK12,
//
DISP=(NEW,PASS),DSN=&&A
3. //LKED
EXEC PGM=LINKEDIT
4. //LKEDIN
DD
DISP=OLD,DSN=*.COMPILE.COMPOUT
5. //SYSLMOD DD
DISP=(NEW,PASS),DSN=&&GOSET(GO),
//
VOL=REF=*.COMPILE.COMPOUT
6. //GO
EXEC PGM=REF=*.LKED.SYSLMOD
7. //MYDATA
DD
DSN=MYDATA,DISP=(NEW,CATLG),
//
VOL=SER SPACE=(800,50),
//
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
8. //TEMP
DD
UNIT=SYSDA,DCB=___________
Complete those statements by coding the appropriate backward references as follows:
The DCB attributes in statement 8 refer to statement 7.
Review
Page 42 of 73
Glossary
DD Statement
A JCL statement that describes each data set used within a job step.
ddname
Data definition name. A unique name given to each data set used in a job step.
Job Step
The job control statements that request and control the execution of a program and
request the resources needed to run the program. A job step is identified by an
EXEC statement.
Data sets
Parameter Values
PGM
DSN
Continued
Glossary
Page 43 of 73
Glossary (contd)
VOL
DCB
of
Load Module
SYSLMOD
DD name used by the linkage editor to write its output (a load module or LMOD).
DISP
with
Describes the status of a data set to the system and tells the system what to do
the data set after termination of the step or job.
Glossary
Page 44 of 73
Topic Summary
Now that you have completed this topic, you should be able to:
Summary
Page 45 of 73
UNIT
Page 46 of 73
Topic Objectives
At the end of this topic, you will be able to:
Introduction
Page 47 of 73
Concepts
Page 48 of 73
Concepts
Page 49 of 73
//ddname DD DSN=JAN.DATA
//
DD DSN=FEB.DATA
//
DD DSN=MAR.DATA
Continued
Concepts
Page 50 of 73
Concepts
The concatenated data sets must have the same (or compatible) DCB subparameters. Namely,
RECFM, LRECL and BLKSIZE.
Page 51 of 73
Concepts
//LEDGER DD DSN=JAN,DISP=SHR
//
DD DSN=FEB,DISP=SHR
.
.
.
//
DD DSN=DEC,DISP=SHR
//SUM
DD DSN=ACCT.1999,DISP=SHR
Page 52 of 73
Are We on Track?
DD DSN=CUST.HISTROY.OCT
C. // DD DSN=CUST.HISTROY.JAN
D. // DD DSN=CUST.HISTROY.JUL
Review
Page 53 of 73
Glossary
Concatenated data sets Data sets that are separate physically, but processed sequentially as one logical
data set.
ddname
Data definition name. A unique name given to each data set used in a job step.
DCB
Glossary
Page 54 of 73
Topic Summary
Now that you have completed this topic, you should be able to:
Summary
Page 55 of 73
UNIT
Page 56 of 73
Topic Objectives
At the end of this topic, you will be able to:
Introduction
Page 57 of 73
Overview
Each data set that is referred by a program
should
have a ddname. The JCL for the program must
contain the corresponding DD statements.
If a data set is not coded by a DD statement, then
the program will abnormally end (ABEND) as
shown.
When an input data set is optional for the
programs processing or when an output data set
is not required dummy data sets can be used.
Concepts
Page 58 of 73
Concepts
Page 59 of 73
//ddname DD
DUMMY
Coding DSN=NULLFILE
Syntax:
//ddname DD
DSN=NULLFILE
Page 60 of 73
//STEPA
//TIMECDS
//ADJUST
EXEC
DD
DD
PGM=PAY
----.
.
.
Continued
Concepts
Page 61 of 73
//STEPA
//TIMECDS
//ADJUST
EXEC
DD
DD
PGM=PAY
---DUMMY
If the data set described by the DD statement named ADJUST is referred to by the PAY program, an
immediate end-of-file occurs. The program will continue as if it has processed the entire data set.
Concepts
Page 62 of 73
Are We on Track?
You can specify a dummy data set by coding DSN= ____________ on the DD statement.
Review
Page 63 of 73
Are We on Track?
The following JCL contains statements to execute a payroll update program called PAYROL.
PAYROL reads a TRANS data set for getting time card information and updates the PAYMAST data
set. A report of all transactions is created. The REPORT DD statement describes the report data
set.
Order the following statements to ignore the report of transactions created by PAYROL.
A. //MASTER DD
DSN=PAYMAST.DISP=OLD
B. //TRANS
DSN=TRANS,DISP=SHR
DD
C. //REPORT DD
D. //STEP1
Review
DUMMY
EXEC PGM=PAYROL
Page 64 of 73
Topic Summary
Now that you have completed this topic, you should be able to:
Summary
Page 65 of 73
UNIT
Page 66 of 73
Topic Objectives
At the end of this topic, you will be able to:
Introduction
Page 67 of 73
Storage Dumps
What are Storage Dumps?
When a program abnormally terminates, storage
dumps are used as a debugging tool to find clues
to the cause for abnormal ending.
Storage dumps are not the most effective
debugging tool.
The main drawbacks of storage dumps are:
Concepts
Page 68 of 73
Special DDnames
These reserved ddnames request storage dumps in the event that a program terminates abnormally:
Concepts
SYSUDUMP: Requests a formatted dump of the processing program area. It is most generally used
for debugging problem programs.
SYSABEND: Requests a formatted dump of the processing program area, system programs and
the system control blocks. It is often spooled for printing, although it may be written
onto any output device.
SYSMDUMP:Requests an unformatted dump of the processing program area and the system
nucleus in machine-readable form. It is generally directed to tape (or to direct access
storage) to allow subsequent processing by a dump analysis utility.
Page 69 of 73
//STEP1
//SYSDUMP
//DD1
//STEP2
//SYSDUMP
EXEC
DD
DD
EXEC
DD
PGM=PROG1
SYSOUT=X
...
PGM=PROG2
SYSOUT=X
Concepts
Page 70 of 73
Are We on Track?
Review
1. SYSABEND
2. SYSMDUMP
3. SYSUDUMP
Page 71 of 73
Topic Summary
Now that you have completed this topic, you should be able to:
Summary
Page 72 of 73
Summary
Page 73 of 73