Академический Документы
Профессиональный Документы
Культура Документы
The basics of
Job Control Language
Murachs
OS/390 and
z/OS JCL
Chapter 4,
Slide 1
Objectives
Applied objectives
Code a valid JOB statement using the format required by your installation.
Code an EXEC statement to invoke a program and pass a parameter value to it.
Code the JCL and data for an instream data set. The data may or may not
include JCL statements.
Given complete specifications for a job, code its JCL using the statements
presented in this chapter.
Murachs
OS/390 and
z/OS JCL
Chapter 4,
Slide 2
Objectives (continued)
Knowledge objectives
Describe the rules you must follow when coding a name in the name field.
Murachs
OS/390 and
z/OS JCL
Chapter 4,
Slide 3
Murachs
OS/390 and
z/OS JCL
Figure 4-01a
Chapter 4,
Slide 4
Murachs
OS/390 and
z/OS JCL
Figure 4-01b
Chapter 4,
Slide 5
A multi-step job
Job
Job steps
steps
//MM01A
//STEP1
//FILEA
//FILEB
//STEP2
//FILEB
//FILEC
//REPORTA
//
Murachs
OS/390 and
z/OS JCL
JOB 36512
EXEC PGM=PROGA
DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR
DD DSNAME=MM01.CUSTOMER.LIST,DISP=(NEW,KEEP)
EXEC PGM=PROGB
DD DSNAME=MM01.CUSTOMER.LIST,DISP=(OLD,DELETE)
DD
DSNAME=MM01.CUSTOMER.INVOICE,DISP=SHR
DD
SYSOUT=*
Figure 4-01c
Chapter 4,
Slide 6
//MM01A
//POST
//CUSTTRAN
//CUSTMAST
//TRANJRNL
//ERRLIST
//
Murachs
OS/390 and
z/OS JCL
Operation
field
JOB
EXEC
DD
DD
DD
DD
Parameters
field
36512,'R. MENENDEZ',NOTIFY=MM01
PGM=CM3000
DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR
DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR
SYSOUT=*
SYSOUT=*
Figure 4-02a
Chapter 4,
Slide 7
Murachs
OS/390 and
z/OS JCL
Figure 4-02b
Chapter 4,
Slide 8
Positional parameters
//MM01A
//MM01A
JOB
JOB
36512,'R MENENDEZ'
,'R MENENDEZ'
Keyword parameters
//CUSTMAST DD
DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR
DSNAME=MM01.CUSTOMER.MASTER,DISP=(,CATLG,DELETE),
UNIT=SYSDA,VOL=SER=MPS800,
SPACE=(CYL,(10,5,2)),
DCB=DSORG=PO
//DUNNING
//
//
//
DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),
UNIT=SYSDA,VOL=SER=MPS800,
SPACE=(CYL,(1,1)),
DCB=(DSORG=PS,RECFM=FB,LRECL=400)
Murachs
OS/390 and
z/OS JCL
DD
Figure 4-03a
Chapter 4,
Slide 9
OS/390 and
z/OS JCL
Figure 4-03b
Chapter 4,
Slide 10
Murachs
OS/390 and
z/OS JCL
Figure 4-03c
Chapter 4,
Slide 11
DD
Murachs
OS/390 and
z/OS JCL
DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),
UNIT=SYSDA,VOL=SER=MPS800,
SPACE=(CYL,(1,1)),
DCB=(DSORG=PS,RECFM=FB,LRECL=400)
Figure 4-04a
Chapter 4,
Slide 12
JOB
EXEC
DD
DD
DD
36512,MENENDEZ,NOTIFY=MM01
PGM=CM3000
**Post cust transactions**
DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR
DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR
SYSOUT=*
Murachs
OS/390 and
z/OS JCL
Figure 4-04b
Chapter 4,
Slide 13
JOB [
[
[
[
accounting-information ] [,programmer-name ]
,MSGCLASS=class ]
,MSGLEVEL=(stmt,msg) ]
,NOTIFY=user-id ]
Explanation
accounting-information Specifies an account number or other accounting information.
programmer-name
Identifies the owner of the job.
MSGCLASS
Specifies a single-character output class to be used for the jobs
message output.
MSGLEVEL
Controls which JCL statements and system messages are produced
by the job.
NOTIFY
Specifies the TSO/E user to be notified when the job completes.
Murachs
OS/390 and
z/OS JCL
Figure 4-05a
Chapter 4,
Slide 14
JOB
MMA2AB14
//PAY40B2
JOB
(MMA-001,'06/11/02',206),MENENDEZ,MSGCLASS=A
//PAY40B3
JOB
,MENENDEZ,MSGCLASS=A
//PAY40B4
JOB
MSGCLASS=A,MSGLEVEL=(0,0),NOTIFY=MM01
Murachs
OS/390 and
z/OS JCL
Figure 4-05b
Chapter 4,
Slide 15
//(ABCDE)
//PR_001
Murachs
//PAYMENT805
OS/390 and
z/OS JCL
Chapter 4,
Slide 16
JOB
36512,RMENENDEZ
//MM01B
JOB
,R.MENENDEZ
//MM01C
JOB
,'R MENENDEZ'
//MM01D
JOB
36512,'O''Brien'
//MM01E
JOB
,DEPT-10
JOB 36512,LOWE,NOTIFY=MM01
//MM01B
JOB 36512,LOWE,NOTIFY=&SYSUID
ENDED AT DDC1NJE
MAXCC=0 CN(INTERNAL)
***
Murachs
OS/390 and
z/OS JCL
Figure 4-07
Chapter 4,
Slide 17
Explanation
class
Identifies the output class for the job log. The class can only be one
character long (A-Z or 0-9) and must be a valid output class specified at
JES initialization.
Explanation
stmt
msg
Murachs
OS/390 and
z/OS JCL
Figure 4-08a
Chapter 4,
Slide 18
Murachs
OS/390 and
z/OS JCL
Figure 4-08b
Chapter 4,
Slide 19
Explanation
PGM
PARM
Specifies the name of the program to be executed for this job step.
Optional; specifies information thats passed to the program.
Murachs
OS/390 and
z/OS JCL
Figure 4-09a
Chapter 4,
Slide 20
EXEC PGM=PAY5B10
EXEC PGM=IEBDG,PARM='LINECT=0050'
Murachs
OS/390 and
z/OS JCL
EXEC PGM=HEWL,PARM='LET,MAP,XREF'
Figure 4-09b
Chapter 4,
Slide 21
DD DSNAME=data-set-name
,DISP=(status,normal-disp,abnormal-disp)
[ ,UNIT=unit ]
[ ,VOL=SER=serial-number ]
[ ,SPACE=unit,(primary-qty,secondary-qty,dir) ]
[ ,DCB=(option,option...) ]
Explanation
DSNAME Specifies the files data set name.
DISP
Specifies the files status and normal and abnormal disposition.
UNIT
Specifies a group name, device type, or device number that identifies the
device where the file resides.
VOL=SER Specifies the six-character volume serial number of the volume that contains
the file.
SPACE
Specifies the DASD space to be allocated for the file.
DCB
Specifies options to be used for the files data control block.
Murachs
OS/390 and
z/OS JCL
Figure 4-10a
Chapter 4,
Slide 22
DD
DSNAME=MM01.INVNTORY.MASTER,DISP=SHR
Murachs
OS/390 and
z/OS JCL
DD
DSNAME=MM01.ACCOUNT.MASTER,DISP=(NEW,CATLG),
UNIT=SYSDA,VOL=SER=MPS8BV,
SPACE=(CYL,(10,2)),
DCB=(DSORG=PS,RECFM=FB,LRECL=100)
Figure 4-10b
Chapter 4,
Slide 23
= {data-set-name}
{data-set-name(member)}
DD
DSNAME=MM01.INVMAST.DATA,DISP=SHR
DD
DSN=MM01.INV.DATA(TRANS),DISP=SHR
DSNAME facts
The DSNAME parameter is required on a DD statement for a
permanent data set.
The DSNAME parameter is optional for temporary data sets.
Murachs
OS/390 and
z/OS JCL
Figure 4-11a
Chapter 4,
Slide 24
BCBLOCK
JCBTAB
JESInnnn
JESJCL
JESJCLIN
JESMSGLG JESYSMSG
JOBCAT
JOBLIB
JOURNAL
JST
JS3CATLG J3JBINFO
J3SCINFO J3STINFO
STCINRDR STEPCAT
STEPLIB
SYSCHK
SYSIN
SYSABEND
SYSCKEOV
SYSMDUMP
SYSUDUMP TSOINRDR
Ddname facts
The ddname is a symbolic name that the program specified in the
EXEC statement uses to refer to a data set.
Each ddname should be unique within the job step.
Some ddnames have special meaning to the system and therefore
cannot be used to identify data sets in a processing program.
Murachs
OS/390 and
z/OS JCL
Figure 4-11b
Chapter 4,
Slide 25
Status
NEW
OLD
SHR
MOD
The data set is deleted. If it was retrieved from the catalog, it is also
uncataloged.
KEEP
The data set is retained.
CATLG
The data set is retained and a catalog entry is made.
UNCATLG The data set is retained, but its catalog entry is removed.
PASS
Normal disposition only. The data set is retained for use by a later job
step.
Murachs
OS/390 and
z/OS JCL
Figure 4-12a
Chapter 4,
Slide 26
The new data set is cataloged if the job step ends normally;
otherwise, its deleted
DISP=(,CATLG,DELETE)
Murachs
OS/390 and
z/OS JCL
Figure 4-12b
Chapter 4,
Slide 27
{group-name}
{device-type}
{device-number}
Explanation
group-name
Murachs
OS/390 and
z/OS JCL
Figure 4-13a
Chapter 4,
Slide 28
Explanation
serial-number
Specifies which volume you want to allocate for your data set. If
omitted, MVS scans for eligible volumes based on the UNIT parameter.
Murachs
OS/390 and
z/OS JCL
DD
DSNAME=MM01.INVNTORY.MASTER,DISP=(NEW,CATLG),
UNIT=SYSDA,VOL=SER=MPS8BV,...
Figure 4-13b
Chapter 4,
Slide 29
Explanation
unit
primary-qty
secondary-qty
dir
Murachs
OS/390 and
z/OS JCL
Specifies the unit used to allocate space to the data set, as follows:
TRK
Allocates space in tracks.
CYL
Allocates space in cylinders.
blklgth Allocates space in blocks, with the block size given in bytes.
reclgth Allocates space based on the average record length in bytes.
Specifies the number of units to be initially allocated to the file.
Specifies the number of units to be allocated to each secondary extent.
Specifies the number of directory blocks to allocate for a partitioned data
set.
Figure 4-14a
Chapter 4,
Slide 30
Primary:
Secondary:
Directory:
Example 2
4 cylinders
1 cylinder
5 blocks
SPACE=(TRK,(5,2))
Primary:
Secondary:
Example 3
5 tracks
2 tracks
SPACE=(800,(500,100))
Murachs
OS/390 and
z/OS JCL
Primary:
Secondary:
Chapter 4,
Slide 31
RECFM=x
LRECL=n
BLKSIZE=n
Murachs
OS/390 and
z/OS JCL
Figure 4-15a
Chapter 4,
Slide 32
Murachs
OS/390 and
z/OS JCL
Figure 4-15b
Chapter 4,
Slide 33
DD
{*}
{DATA}
[ ,DLM=xx ]
Explanation
* or DATA Indicates that instream data follows. If you code an asterisk, the next JCL
statement ends the data. If you code DATA, you must include a delimiter
statement to end the data.
DLM
Specifies the characters that identify a delimiter statement. If omitted, slashasterisk (/*) is the default.
Murachs
OS/390 and
z/OS JCL
Figure 4-16a
Chapter 4,
Slide 34
Example 2
//SYSIN
DD
DATA,DLM=##
//INVTRAN DD
*
A00101005995CH445
A00103010030CH445
A00272001950CJ550
/*
##
Note: The shading indicates the records that are processed as data for the instream
data set.
Murachs
OS/390 and
z/OS JCL
Figure 4-16b
Chapter 4,
Slide 35
DD
SYSOUT=x
Explanation
SYSOUT
DD
SYSOUT=A
Murachs
OS/390 and
z/OS JCL
DD
SYSOUT=*
Figure 4-17
Chapter 4,
Slide 36
Murachs
OS/390 and
z/OS JCL
Figure 4-18a
Chapter 4,
Slide 37
Murachs
OS/390 and
z/OS JCL
Figure 4-18b
Chapter 4,
Slide 38
Murachs
OS/390 and
z/OS JCL
JOB
36512,'M MURACH',MSGCLASS=A,MSGLEVEL=(1,1),
NOTIFY=MM02
EXEC PGM=CM3000
DD
DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR
DD
DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR
DD
DSNAME=MM01.CUSTOMER.TRANS.ERRS,DISP=SHR
DD
SYSOUT=*
DD
SYSOUT=*
DD
SYSOUT=*
Figure 4-18c
Chapter 4,
Slide 39
Murachs
OS/390 and
z/OS JCL
Figure 4-19a
Chapter 4,
Slide 40
SORT1
SORT
SYSOUT
SORTIN
MM01.ACCOUNT.MASTER
SORTOUT
MM01.ACCOUNT.MASTER.SORT
AR7100
SYSIN
ARSORT
MM01.ACCOUNT.MASTER.SORT
CUSTMAST MM01.CUSTOMER.MASTER
AR7200
Murachs
OS/390 and
z/OS JCL
AR7200
DUNNING
MM01.DUNNING.FILE
DUNNING
MM01.DUNNING.FILE
ATB
OVERDUE
Figure 4-19b
Chapter 4,
Slide 41
SORT2
SORT
SYSOUT
SORTIN
MM01.DUNNING.FILE
SORTOUT
MM01.DUNNING.FILE.SORT
Murachs
OS/390 and
z/OS JCL
AR7300
SYSIN
DUNSORT
MM01.DUNNING.FILE.SORT
XREF
STMTS
Figure 4-19c
Chapter 4,
Slide 42
6
7
8
9
10
11
//MM01RP
JOB 36512,'A PRINCE',MSGCLASS=X,MSGLEVEL=(1,1),
//
NOTIFY=MM03
//SORT1
EXEC PGM=SORT
//SYSOUT
DD
SYSOUT=*
//SORTIN
DD
DSNAME=MM01.ACCOUNT.MASTER,DISP=SHR
//SORTOUT DD
DSNAME=MM01.ACCOUNT.MASTER.SORT,DISP=(NEW,KEEP),
//
UNIT=SYSDA,VOL=SER=MPS800,
//
SPACE=(CYL,(1,1)),
//
DCB=(DSORG=PS,RECFM=FB,LRECL=400)
//SORTWK01 DD
UNIT=SYSDA,VOL=SER=MPS800,
//
SPACE=(CYL,(1,1))
//SYSIN
DD
*
SORT
FIELDS=(16,5,CH,A,1,5,CH,A)
/*
//AR7100
EXEC PGM=AR7100
//ARSORT
DD
DSNAME=MM01.ACCOUNT.MASTER.SORT,DISP=(OLD,DELETE),
//
UNIT=SYSDA,VOL=SER=MPS800
//CUSTMAST DD
DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR
//DUNNING DD
DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),
//
UNIT=SYSDA,VOL=SER=MPS800,
//
SPACE=(CYL,(1,1)),
//
DCB=(DSORG=PS,RECFM=FB,LRECL=400)
Murachs
OS/390 and
z/OS JCL
Figure 4-20a
Chapter 4,
Slide 43
//AR7200
EXEC PGM=AR7200
//DUNNING DD
DSNAME=MM01.DUNNING.FILE,DISP=OLD,
//
UNIT=SYSDA,VOL=SER=MPS800
//ATB
DD
SYSOUT=*
//OVERDUE DD
SYSOUT=*
//SORT2
EXEC PGM=SORT
//SYSOUT
DD
SYSOUT=*
//SORTIN
DD
DSNAME=MM01.DUNNING.FILE,DISP=(OLD,DELETE),
//
UNIT=SYSDA,VOL=SER=MPS800,
//SORTOUT DD
DSNAME=MM01.DUNNING.FILE.SORT,DISP=(NEW,KEEP),
//
UNIT=SYSDA.VOL=SER=MPS800,
//
SPACE=(CYL,(1,1))
//
DCB=(DSORG=PS,RECFM=FB,LRECL=400)
//SORTWK01 DD
UNIT=SYSDA,VOL=SER=MPS800,
//
SPACE=(CYL,(1,1))
//SYSIN
DD
*
SORT
FIELDS=(43,2,CH,A,1,5,CH,A,50,5,CH,A)
/*
//AR7300
EXEC PGM=AR7300
//DUNSORT DD
DSNAME=MM01.DUNNING.FILE.SORT,DISP=(OLD,DELETE),
//
UNIT=SYSDA,VOL=SER=MPS800
//XREF
DD
SYSOUT=*
//STMTS
DD
SYSOUT=*
Murachs
OS/390 and
z/OS JCL
Figure 4-20b
Chapter 4,
Slide 44