z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Backward references

z/OS MVS JCL Reference
SA23-1385-00

A backward reference is a reference to an earlier DD statement in the job or in a cataloged or in-stream procedure called by a job step. A backward reference is in the form *.ddname or *.stepname.ddname or *.stepname.procstepname.ddname. The ddname in the reference is the ddname of the earlier DD statement. If the earlier DD statement contains a DDNAME parameter, the reference is to the ddname in the name field of the earlier statement, not to the ddname in the DDNAME parameter.

The DD statement referenced in a DDNAME parameter cannot refer to a DD statement between the statement containing the DDNAME parameter and itself. For example:
//SHOW   EXEC PGM=ABLE
//DD1    DD   DDNAME=INPUT
//DD2    DD   DSNAME=TEMPSPAC,SPACE=(TRK,1),UNIT=SYSDA
//DD3    DD   DSNAME=INCOPY,VOLUME=REF=*.DD1,
//            DISP=(,KEEP),SPACE=(TRK,(5,2))
//DD4    DD   DSNAME=OUTLIST,DISP=OLD
//DD5    DD   DSNAME=MESSAGE,DISP=OLD,UNIT=3390,VOLUME=SER=333333
//INPUT  DD   DSNAME=NEWLIST,DISP=(OLD,KEEP),VOLUME=SER=333333,
//            UNIT=3390

The DDNAME parameter on DD1 refers to DD statement INPUT. The VOLUME parameter of DD3 specifies a backward reference to DD1, which is the name field ddname.

DD statement INPUT identifies the volume 333333 in its VOLUME=SER=333333 parameter. DD statement INPUT cannot use a backward reference to the VOLUME parameter on DD5 because DD5 is between the referring DD1 and the referenced INPUT.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014