The DD statement links the external dataset to the
ddname coded within the executing program. It links the
files within the program code to the filenames known to the
MVS Operating system. The syntax is:
//DDANAME DD DSN=NAME,
// DISP=(NEW,CATLG,DELETE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800),
// SPACE=(CYL,(20,5),RLSE),
// UNIT=SYSDA
DSN- Name of the dataset- separated by periods, each name 1
to 8 characters, total 44 chars including periods.
DISP- It specifies the disposition of the dataset.
DISP=(status,normal-disposition,abnormal-disposition)
Status – The statuses NEW,MOD,OLD,SHR are the status of the
dataset at the beginning of the step.
NEW is given to create a new dataset. It is the default if
anything is not coded.
OLD designates an existing dataset with exclusive control.
SHR designates an existing dataset without exclusive
control.
MOD is used to extend the dataset if it exists or to create
a new one if it does not exist.
Normal-disposition- It directs the system on the
disposition of the data set (pass, keep, catlg, uncatlg,
delete) when the step ends normally.
Abnormal-disposition- It directs the system on the
disposition of the data set (keep, catlg, uncatlg, delete)
when the step ends abnormally.
DCB- Physical characteristics of a Data Set are described
by DCB Parameters. These parameters must be coded for newly
created data set as well as for existing Datasets.
• LRECL=n (VALUE IN BYTES)
• RECFM=(F/FB/V/VB/U)
• BLKSIZE= multiple of LRECL
• DSORG=(PS/PO/DA)
PO: specifies a partitioned Organization, DA: specifies a
direct organization.
SPACE=(space units,
(primary,secondary,dir),RLSE,CONTIG,MXIG,ROUND)
space unit - TRK(tracks)/CYL(cylinders)/BLOCKSIZE in bytes.
In our above example it allocates 20 cycles primary and if
required allocates 5 secondary cycles.
RLSE- Request to release the space that is primarily
allocated if unused.
VOL parameter is primarily used for tapes. A volume is the
portion of the storage device served by one read/write
mechanism. To request specific volumes, we code
VOL=SER=volume for one volume or VOL=SER=(volume, volume…)
for multiple volumes. Volume serial numbers are one to six
characters.
SYSOUT parameter is used to route the output to a device.
// DDNAME DD SYSOUT=CLASS
ddname coded within the executing program. It links the
files within the program code to the filenames known to the
MVS Operating system. The syntax is:
//DDANAME DD DSN=NAME,
// DISP=(NEW,CATLG,DELETE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800),
// SPACE=(CYL,(20,5),RLSE),
// UNIT=SYSDA
DSN- Name of the dataset- separated by periods, each name 1
to 8 characters, total 44 chars including periods.
DISP- It specifies the disposition of the dataset.
DISP=(status,normal-disposition,abnormal-disposition)
Status – The statuses NEW,MOD,OLD,SHR are the status of the
dataset at the beginning of the step.
NEW is given to create a new dataset. It is the default if
anything is not coded.
OLD designates an existing dataset with exclusive control.
SHR designates an existing dataset without exclusive
control.
MOD is used to extend the dataset if it exists or to create
a new one if it does not exist.
Normal-disposition- It directs the system on the
disposition of the data set (pass, keep, catlg, uncatlg,
delete) when the step ends normally.
Abnormal-disposition- It directs the system on the
disposition of the data set (keep, catlg, uncatlg, delete)
when the step ends abnormally.
DCB- Physical characteristics of a Data Set are described
by DCB Parameters. These parameters must be coded for newly
created data set as well as for existing Datasets.
• LRECL=n (VALUE IN BYTES)
• RECFM=(F/FB/V/VB/U)
• BLKSIZE= multiple of LRECL
• DSORG=(PS/PO/DA)
PO: specifies a partitioned Organization, DA: specifies a
direct organization.
SPACE=(space units,
(primary,secondary,dir),RLSE,CONTIG,MXIG,ROUND)
space unit - TRK(tracks)/CYL(cylinders)/BLOCKSIZE in bytes.
In our above example it allocates 20 cycles primary and if
required allocates 5 secondary cycles.
RLSE- Request to release the space that is primarily
allocated if unused.
VOL parameter is primarily used for tapes. A volume is the
portion of the storage device served by one read/write
mechanism. To request specific volumes, we code
VOL=SER=volume for one volume or VOL=SER=(volume, volume…)
for multiple volumes. Volume serial numbers are one to six
characters.
SYSOUT parameter is used to route the output to a device.
// DDNAME DD SYSOUT=CLASS
Hi,
ReplyDeleteIs Disp is a Keyword parameter or positional parameter ?
Cheers
Gyaa
Disp is a keyword parameter...
ReplyDeleteDisp is used to specify the disposition of dataset which is coded on DSN parameter.