No Slide Title

Download Report

Transcript No Slide Title

Using JCL Facilities To
Allocate Other DASD Data Sets
Chapter # 6
Stephen Linkin
Houston Community College
5-Feb-07
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
1
Objectives

Applied objectives

Code the JCL necessary to:
a. allocate a single-step temporary data set
b. allocate a passed temporary data set




Code JCL to allocate a dummy data set.
Code JCL to allocate concatenated data sets.
Code JCL to allocate multiple DASD volumes to
a single data set.
Code the SPACE parameter to:
a. release unused space
b. convert a block allocation to cylinders
c. request a contiguous space allocation


Use the referback facility to obtain DSNAME,
VOLUME, or DCB information from a
previous DD statement.
Code an IEFBR14 job step to allocate and
deallocate data sets.
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
2
Objectives

Knowledge objectives







Explain how to code the name for a temporary data set.
List one advantage of using VIO temporary data sets.
Describe what a dummy data set is.
Describe what concatenated files are.
Describe what a multi-volume data set is.
Describe the effect of a referback in
a DD statement.
Describe why you would code a job that
executes the IEFBR14 program.
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
3
A Temporary Work File

Allocating A Single-step Temporary Data Set

Example 1
//WORK1

DD UNIT=SYSDA,SPACE=(CYL,(10,5))
Example 2
//WORK2
DD UNIT=SYSDA,DISP=(NEW,DELETE),
&&CUSTOMER Over 8
&&CUSTOMERS
//
SPACE=(3200,(500,500)),
&&TEMPRM
// &TRANSSRT
DCB=LRECL=120
Missing &

Rules For
Coding Temporary
Names
&&A Data Set Has
&&MM01.ARS
Period





1 To 8&&1ABC
Alphanumeric Or
National Characters,
&&DD$1
Start Wrong
Starting With An Alphabetic Or National Character.
Preceded By Two Ampersands (&&).
Compound Names Are Not Allowed.
Valid Temporary Data Set Names
Invalid Temporary Data Set Names
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
4
Two Step JOB

Using Temporary Data Sets
//MM01RN JOB (36512),'R MENENDEZ',MSGCLASS=X,MSGLEVEL=(1,1),
//
CLASS=A,NOTIFY=&SYSUID
//SORT EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSNAME=MMA2.AR.CUSTOMER.MASTER,DISP=SHR
//SORTWK01 DD UNIT=SYSDA,SPACE=(TRK,(1,1))
//SORTWK02 DD UNIT=SYSDA,SPACE=(TRK,(1,1))
//SORTWK03 DD UNIT=SYSDA,SPACE=(TRK,(1,1))
//SORTOUT DD DSNAME=&&SORTCUST,DISP=(NEW,PASS),
//
UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSIN DD *
SORT FIELDS=(2,13,A,20,1,A),FORMAT=CH
/*
//REPORT EXEC PGM=CUSTLST
//SYSOUT DD SYSOUT=*
//CUSTMAST DD DSNAME=&&SORTCUST,DISP=(OLD,DELETE)
//ATB
DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
5
VIO Data Sets


Virtual Input/Output
Required Parameters


UNIT=SYSDA/VIO,
Examples of VIO Temporary Data Sets

Example 1


DD UNIT=VIO
Example 2


//TEMP1
//DD1
//
DD UNIT=SYSDA,SPACE=(1000,(10,50)),
DCB=(RECFM=FB,LRECL=40)
Example 3

//SORTOUT DD DSNAME=&&PRODCD,
//
DISP=(NEW,PASS),
//
UNIT=SYSDA,SPACE=(1000,(20,70))
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
6
Dummy Data Sets
Allocating
a dummy data set
 A Dummy Data Set Doesn’t Exist.
 Example
Two Ways
1
To Specify A Dummy Data Set
//SYSIN

DD DUMMY
Code
The Dummy Parameter
Example 2
 DUMMY Is Positional Only And Must Be First.
//CUSTMAST
DD DUMMY,AMP=AMORG
Example
3
 Specify
DSNAME=nullfile.
//TRANFILE DD DUMMY,DSNAME=AR.TRANS.FILE,DISP=(NEW,KEEP),
 //Syntax
for dummy data sets
UNIT=SYSDA,VOL=SER=MPS800,
//
SPACE=(CYL,(5,1)),
//
DCB=(DSORG=PS,RECFM=FB,LRECL=80)
//ddname
DD DUMMY [,parameter]...
Example 4
or
//TRANFILE
DD DSNAME=NULLFILE
DSNAME=NULLFILE,DISP=(NEW,KEEP),
//ddname
DD
[,parameter]...
//
//
//
UNIT=SYSDA,VOL=SER=MPS800,
SPACE=(CYL,(5,1)),
DCB=(DSORG=PS,RECFM=FB,LRECL=80)
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
7
Concatenation

Concatenating data sets

Example 1
//TRANS DD DSNAME=MMA1.TRANS.WEEK1,DISP=SHR
//
DD DSNAME=MMA1.TRANS.WEEK2,DISP=SHR
//
DD DSNAME=MMA1.TRANS.WEEK3,DISP=SHR
Example 2
//SYSLIB DD DSNAME=MMA1.COBOL.OBJLIB,DISP=SHR
//
DD DSNAME=SYS1.COBLIB,DISP=SHR
Example 3
//SYSUT1 DD DSNAME=MM01.TEXT,DISP=OLD,
//
UNIT=TAPE,VOL=SER=M00023
//
DD DSNAME=MM01.ACCTG.DATA(ARMAST),
//
DISP=SHR
//
DD *
(input data records)
/*
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
8
Multiple Volume Allocations

DD statement parameters used in multi-volume
data set allocation
,UNIT=(device,unit-count)
,VOL=SER=(serial-number,serial-number...)

Allocating a multi-volume data set
Example 1
//CUSTMAST DD DSNAME=MMA1.CUSTOMER.MASTER,
//
DISP=(NEW,KEEP),
//
UNIT=SYSDA,VOL=SER=(MVS300,MVS301,MVS302),
//
SPACE=(CYL,(400,200))
Example 2
//CUSTMAST DD DSNAME=MMA1.CUSTOMER.MASTER,
//
DISP=(NEW,CATLG),
//
UNIT=(SYSDA,3),SPACE=(CYL,(400,200))
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
9
SPACE Parameters

The parameter for space assignment


SPACE=(unit,(primary[,secondary][,dir])[,RLSE][, {CONTIG} ][,ROUND])
{MXIG}
{ALX}
The parameter for specific track requests

SPACE=(ABSTR,(primary,address [ {,dir} ])
[ {,index}]
© 2002 - Mike Murach & Associates,
2006
- HCC,
Figure
6-07aIBM
10
More SPACE Parameters

DD statements using the RLSE subparameter

Example 1
//EMPMAST DD DSNAME=MMA1.EMPLOYEE.MASTER,
//
DISP=(,CATLG,DELETE),
//
UNIT=SYSDA,SPACE=(TRK,(400,100),RLSE)

Example 2
//INVMAST DD DSNAME=MMA1.INVENTORY.MASTER,
//
DISP=(,CATLG,DELETE),
//
UNIT=SYSDA,VOL=SER=(MVS300,MVS301,MVS302),
//
SPACE=(CYL,(100,20),RLSE)

A DD statement using the ROUND subparameter
//INSMAST DD DSNAME=MMA1.INSURANCE.MASTER,
//
DISP=(,CATLG,DELETE),
//
UNIT=SYSDA,SPACE=(3200,(5000,1000),,,ROUND)
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
11
SPACE Sub-Parameters

Coding CONTIG, MXIG, and ALX subparameters



Example 1
//EMPMAST DD DSNAME=MMA1.EMPLOYEE.MASTER,
//
DISP=(,CATLG,DELETE),
//
UNIT=SYSDA,SPACE=(CYL,(100,20),,CONTIG)
Example 2
//EMPMAST DD DSNAME=MMA1.EMPLOYEE.MASTER,
//
DISP=(,CATLG,DELETE),
//
UNIT=SYSDA,VOL=SER=MVS300,
//
SPACE=(CYL,(100,20),RLSE,MXIG)
Example 3
//EMPMAST DD DSNAME=MMA1.EMPLOYEE.MASTER,
//
DISP=(,CATLG,DELETE),
//
UNIT=SYSDA,VOL=SER=MVS300,
//
SPACE=(CYL,(100,20),RLSE,ALX)
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
12
Referbacks

The general syntax for a referback
parameter=*.[stepname.]ddname

Parameters that can use the referback facility






DD CNTL
DD DCB
DD DSNAME
DD REFDD (SMS only)
DD VOL=REF
EXEC PGM
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
13
A Job That Uses Referbacks
//MM01AR JOB (36512),LYNCH,MSGCLASS=X,MSGLEVEL=(1,1),
//
CLASS=A,NOTIFY=&SYSUID
//STEP1 EXEC PGM=TRANS
//TRANFILE DD DSNAME=AR.TRANS.FILE,DISP=(NEW,KEEP),
//
UNIT=SYSDA,VOL=SER=MPS800,
//
SPACE=(CYL,(5,1)),
//
DCB=(DSORG=PS,RECFM=FB,LRECL=80)
//TRANERR DD DSNAME=AR.TRANS.ERR,DISP=(NEW,KEEP),
//
UNIT=SYSDA,VOL=SER=MPS801,
//
SPACE=(CYL,(2,1)),
//
DCB=*.TRANFILE
//STEP2 EXEC PGM=TRANSEP
//TRANIN DD DSNAME=*.STEP1.TRANFILE,DISP=SHR
//TRANOUT DD DSNAME=AR.TRANS.A.FILE,DISP=(NEW,KEEP),
//
UNIT=SYSDA,VOL=REF=*.STEP1.TRANFILE,
//
SPACE=(CYL,(5,1)),
//
DCB=*.STEP1.TRANFILE
.
//STEP5 EXEC PGM=*.STEP3.LOADMOD
.
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
14
End Presentation
© 2002 - Mike Murach & Associates,
2006 - HCC, IBM
15