Describe the DD statement, its meaning, syntax and keywords?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / guest
The DD statement links the external dataset name (DSN) to
the DDNAME coded within the executing program. It links the
file names within the program code to the file names know to
the MVS operating system. The syntax is // ddname DD
DSN=dataset name. Other keywords after DSN are DISP, DCB,
SPACE, etc.
Is This Answer Correct ? | 3 Yes | 0 No |
what is the function of spool command?
When we give TYPERUN = SCAN , what are the syntax errors we get?
How to search strings in multiple dataset with conditions 'string1 & string2'?
Hi, If a catolog proc has another proc in it, both have ddnames dd1 and dd2. what proc will override if gave override parameter. Here both have same step names.
Explain how can an in-stream dataset be terminated?
What is the significance of addrspc parameter in the exec statement?
How many instream we can write in single jcl?
I am getting the file from Unix to Mainframes for every 15 minutes. The mainframe job get abended with bad records coming from unix. I recovered that by deleting the bad data. I need permenant solution how to fix the issue? The record is getting characters in in first 9 positions which it should not. Please provide me the solution how to skip the records if it finds the charcters in the first 9 positions. K
How different is the JCL executing a COBOL program? 1) if the program is using VB file as input. 2) if the program is using FB file as input.
What is the function of //jcllib statement?
How to get the last but one duplicate record of the file using Sort?
hi in one of the interview one asked me how to submit a job from cobol?as well as how to submit a jcl from CICS? can u pls any one tell me..