The statement starts with //. The operational field contains DD. For each dataset one DD statement is to be written. The name is called DDNAME. DD Name must be unique within the corresponding step. The DD statement has the name of the dataset, the file structure, Record length, Record Structure.
Parameters in DD statement:
DSN : Dataset Name
UNIT : SYSDA or TAPE
VOL : Indicates the Volume Serial number
SPACE : Space is used only when crating new datasets on DASD.
SPACE=(TRK or CYL,(Primary Extents,Secondary Extents,Directory Blocks))
Primary Extents and Secondary Extents are positional parameters.
For PS DB is zero. For PDS DB is > zero.
DISP : Disposition.
Status can have values of NEW,SHR,OLD,MOD
OLD Overwrites the existing dataset.
MOD : If the dataset exists it appends the records to the file. Creates a dataset if not existing.
Normal indicates what should be done with the dataset when the job ends successfully.
The values can be CATLG,UNCATLG,KEEP,DELETE,PASS
When given CATLG the dataset is created and the System writes the file to the CATLOG.
When given UNCATLG the dataset is created but not written to the CATLOG.
Keep – Keeps the status of the dataset.
Delete – Deletes the dataset and remove it from the CATLOG.
Pass – Used for Temprary datasets.
Abnormal indicates what should be done with the dataset when the job is abended.
DCB : Data Control Block.
DCB=(DSORG=PS or PO,LRECL=value,RECFM=F or FB or V or VS or U,BLKSIZE=Block Size)
DSORG means Dataset organization. RECFM is Record Format.
PS is physical Sequential. PO is used for PDS.