Describe the DD statement, its meaning, syntax and keywords?

Answer Posted / sunitha

Ans: 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.
CONTIG- Request for contiguous space.
MXIG- Request for large area of contiguous space.
ROUND- Request for entire cylinder for storage of dataset.
UNIT parameter indicates the information about input or
output device that will be used
by the dataset. It specifies a group name, device type, or
device number that identifies the
device where the file resides. The Format of the UNIT
parameter is UNIT= groupname/
device-type/device number.
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

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the function of //jcllib statement?

708


What are the 4 fields in dd statement?

744


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

683


What are hierarchy levels in jcl?

960


For what purpose steplib and joblib are used ?

690






I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK

1487


if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

1622


How is a type of file defined in the jcl that executes the cobol program?

716


What is the format of comment statement?

674


What are the jcl procedures?

649


how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

791


hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u

1670


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

1805


Can I send output of job to my remote device careerride123?

670


when can a job time-out occur? How to overcome that?

753