DD DSNTYPE Parameter


Note! DSNTYPE parameter is required only when we are creating a dataset.

DSNTYPE parameter 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. DSNTYPE is an optional parameter.

Syntax -

DSNTYPE={LIBRARY}
         {(LIBRARY,1)}
         {(LIBRARY,2)}
         {HFS    }
         {PDS    }
         {PIPE   }
         {EXTREQ }
         {EXTPREF}
         {LARGE  }
         {BASIC  }
LIBRARY Specifies partitioned dataset extended (PDSE).
(LIBRARY,1) Specifies a version 1 partitioned dataset extended (PDSE).
(LIBRARY,2) Specifies a version 2 partitioned dataset extended (PDSE).
HFS Specifies Hierarchical file system (HFS) dataset.
PDS Specifies a partitioned dataset (PDS).
PIPE Specifies a A first-in, first-out (FIFO) special file.
EXTREQ
(EXTREQ,1)
(EXTREQ,2)
Specifies for the dataset to be extended format.
(EXTREQ,1) specifies a version 1 extended format dataset.
(EXTREQ,2) specifies a version 2 extended format dataset.
EXTPREF
(EXTPREF,1)
(EXTPREF,2)
Specifies for the dataset to be extended format.
(EXTPREF,1) specifies a version 1 extended format dataset.
(EXTREQ,2) specifies a version 2 extended format dataset.
LARGE The system selects a large format if the dataset is sequential (DSORG=PS or PSU).
BASIC The system will select a basic format if the dataset is sequential (DSORG=PS or PSU).

Examples -


Scenario - Define PDS.

//NEWPDS   DD DSN=MTH.DATA.PSFILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(3,2,2),RLSE),
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=1600),
//            DSNTYPE=PDS