JCL DSNAME Parameter

JCL DSNAME Parameter

In JCL DSNAME is an optional Keyword parameter which contains the name of the Data Set. 

DSNAME is also written as DSN which stands for Data Source Name or Data Set Name.

The Syntax of DSN for PS file:
DSN=QLFR1.QLFR2.QLFR3
or
DSNAME=QLFR1.QLFR2.QLFR3

The Syntax of DSN for PDS file:
DSN=QLFR1.QLFR2.QLFR3.FLFR4(MEMBER)
or
DSNAME=QLFR1.QLFR2.QLFR3(MBRNAME)

Note/warning/suggestion/improvement:
In case of PS or PDS file, a maximum of 45 characters is allowed for the dataset which is coded in DSN.

In case of GDG(Generation Data Group), a maximum of 35 characters is allowed for a fully qualified DSN.

DSN Parameter in JCL

JCL DSN for Temporary Datasets

Temporary datasets start from two ampersands “&&” and it is created in a job and it is destroyed itself after the job is completed.

Temporary datasets can have a maximum of eight characters.

The Syntax of DSN in case of Temporary Datasets:
DSN=&&
Here, DATASETNAME is the name of the dataset. For example – TEMPFILE, TMPFIL1 etc.

Tutorials for all brains!