DD DSN Parameter


The DSN (DataSet Name) parameter is used to specify the dataset name. The dataset can be any type, such as a flat file (PS), a partitioned dataset(PDS), a VSAM dataset, or a tape dataset.

The DSNAME also refered with short name DSN. For the new dataset, the name is a new name assigning to the dataset. For the existing dataset, the name is the cataloged name to locate the dataset.

Syntax -

//DDname DD DSN=datasetname
or
//DDname DD DSNAME=datasetname

PDS Names -

DSN=datasetname
DSN=datasetname(member)
DSN=datasetname(generation)

Temporary dataset Names -

DSN=&&datasetname
DSN=&&datasetname(member)

Refer back name from previous DD statements -

DSN=*.ddname
DSN=*.stepname.ddname
DSN=*.stepname.procstepname.ddname

NULLFILE -

DSN=NULLFILE
DUMMY
datasetname Specifies the dataset name.
&&dsname Specifies the name of a temporary dataset.
member Specifies the name of a PDS/PDSE member
*.ddname Specifies the dataset name that should use from the previous ddname.
NULLFILE/DUMMY Specifies a dummy dataset.

Examples -


Scenario - For PS file.

//DD01   DD  DSN=MTH.DATA.PSFILE,DISP=SHR