DD Statement IQ for Freshers


Explain the DD statement in JCL?

DD (Data Definition) statement is used to specify input and output files for a job step.

What is the role of the DD statement in JCL?

It defines a dataset or file name, attributes, and location and assigns it a DDname to be referenced within the job step.

Describe the DD statement syntax and keywords?

//DDname DD parameters [comments]
  • DDname - It is the name assigned to the dataset or file being defined.
  • DD Keyword - It is the keyword used to code the DD statement in JCL.
  • Parameters - Parameters provide the additional information needed for DD statement.
  • Comment - It is used to make a note of the current statement.

What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?

DDname is the name assigned to the dataset or file being defined. DSN (DataSet Name) parameter is used to specify the name of a dataset.

What is the first parameter in the DD statement of a JCL, and what information does it specify?

DSNAME and it provides the file name to JCL.

What is the Maximum number of DD statements in a step?

255

DSN Parameter -

What is a DSN parameter and why is it used in JCL?

DSN (DataSet Name) parameter is used to specify the name of a dataset.

What are the parameters to declare the DSN?

DISP parameter is mandatory and remaining all are optional.

DISP Parameter -

What is use of DISP parameter in DD statement?

DISP parameter specifies how a dataset is to be handled in the job or job step.

How many parameters are there to a DISP statement and what are their uses?

DISP=(status[,normal-termination-action][,abnormal-termination-action])

What is DISP=(NEW,PASS,DELETE)?

It specifies that a new dataset is to be created, passed to further steps if step execution completed successfully or file deleted if step execution is not successful.

What does a disposition of (NEW,CATLG,DELETE) mean?

It specifies that a new dataset is to be created, cataloged if step execution completed successfully or file deleted if step execution is not successful.

What does a disposition of (NEW,CATLG,KEEP) mean?

It specifies that a new dataset is to be created, cataloged if step execution completed successfully or file kept if step execution is not successful.

What is the meaning of DISP=SHR?

It specifies the dataset already exists before the step and used only for reading.

What is the meaning of DISP=OLD?

It specifies that the dataset already exists and used with exclusive control on the dataset.

When should DISP=MOD is used?

It specifies dataset exists before this step and used to append the data to the dataset.

SYSOUT Parameter -

What is the significance of SYSOUT parameter?

It is used to specify the destination of system output, such as job log, operator messages, and program output.

SPACE Parameter -

What is use of SPACE parameter in DD statement?

It is used to specify the amount of disk space required for creating a new dataset and the allocation should request on direct access volume (DSAD).

How much space OS allocates when you create a PS or PDS?

OS allocates the space according to the values coded in the SPACE parameters by the user. This parameter defines the primary and secondary space allocations and the unit of allocation (e.g., cylinders, tracks, or blocks).

UNIT Parameter -

What is the purpose of the unit parameter in the mainframe?

It is used to specify the system to place the dataset on a specific device or a group of devices.

DSORG Parameter -

What is the purpose of the DSORG parameter in the mainframe?

It specifies the organization of the dataset. The value of this parameter determines how the data in the dataset is arranged and accessed.

How does the system determine whether a file is a PS or a PDS file?

using DSORG parameter.

What are the valid DSORG values?

PS (sequential file), PO (PDS), DA (direct access).

RECFM Parameter -

What is the purpose of the RECFM parameter in DD statement?
What determines the record format in a data set?

It is used to define the record format for the new dataset. It specifies the structure of the records in the dataset, such as their length (fixed or variable) and storage structure (blocked or unblocked).

How many types of record formats are available?

15. U, UT, F, FB, FS, FT, FBS, FBT, V, VB, VS, VT, VBS, VBT and VBST.

LRECL Parameter -

What is the purpose of the LRECL parameter in DD statement?
What determines the record length in a data set?

It is used to specify the record length for new datasets during their creation.

BLKSIZE Parameter -

What is the purpose of the BLKSIZE parameter in DD statement?

It is used to specify the size of the physical blocks used when reading or writing a dataset.

DCB Parameter -

Explain in DD statement what is the use of DCB parameter?

It is a parameter that is used to define how a dataset is to be processed. The DCB parameter provides information about the organization, record format, record length, block size, and other dataset attributes.

How can you specify DCB information?

DCB=(subparameter[,subparameter]...)

VOLUME Parameter -

What is the purpose of the VOLUME parameter in DD statement?

It is used to specify the name of the DASD (Direct Access Storage Device) volume on which a dataset is stored or is to be stored.

LIKE Parameter -

What is the purpose of the LIKE parameter in DD statement?

LIKE parameter allows you to create a new dataset with the attributes of an existing dataset.

RECORG Parameter -

What is the purpose of the RECORG parameter in DD statement?

It is used to specify the record organization for the new dataset. It is only applicable while creating a VSAM dataset with SMS. RECORG is an optional parameter.

DSNTYPE Parameter -

What is the purpose of the DSNTYPE parameter in DD statement?

It is used to specify the dataset type with the DD statement. This parameter is always used while creating a dataset and tells the system that what kind of dataset it is.

DEST Parameter -

What is the purpose of the DEST parameter in DD statement?

It is used to specify the destination of printed output produced by a job. It identifies the physical printer or destination to which the output is to be sent.

EXPDT Parameter -

What is the purpose of the EXPDT parameter in DD statement?

It is used to set the expiration date while creating a new dataset. Once the expiration date is reached, the system automatically deletes the dataset without any user involvement.

KEYLEN Parameter -

What is the purpose of the KEYLEN parameter in DD statement?

It is used to specify the key length while creating the new dataset. If KEYLEN is not coded, the dataset does not have any keys.

OUTLIM Parameter -

What is the purpose of the OUTLIM parameter in DD statement?

It is used to set the maximum number of logical records that can be written to an SYSOUT dataset.

RETPD Parameter -

What is the purpose of the RETPD parameter in DD statement?

It specifies the number of days that a dataset should be retained from the date of creation.

Frequently Asked Questions -

What represents a data set name in a DD statement?

Explain DISP=(NEW,PASS,DELETE)?

What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

Mention what is the difference between specifying DISP=OLD, DISP=MOD and DISP=SHR for a dataset?

Mention what is the difference between specifying DISP=OLD, DISP=MOD and DISP=SHR for a dataset?

What is the role of the space parameter in the mainframe for data sets?

On the DD statement, what is the main difference between creating a new sequential flat file and a partitioned dataset?

What is use of DCB parameter in DD statement?
What are the keywords associated with DCB?
What does the keyword DCB mean and what are some of the keywords associated with it?