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

Many parameters in job control statements can use a backward reference to fill in information. A backward reference is a reference to an earlier statement in the job or in a cataloged or in-stream procedure called by a job step. A backward reference is in the form:
  • *.name or *.ddname where name or ddname is the name field of the referenced statement.
  • *.stepname.name or *.stepname.ddname where the referenced statement, name or ddname, is in an earlier step, stepname, in the same job.
  • *.stepname.procstepname.name or *.stepname.procstepname.ddname where this job step or an earlier job step, stepname, calls a procedure; the procedure contains procedure step, procstepname, which contains the referenced statement, name or ddname.

If stepname is specified without a procstepname, it identifies an EXEC statement that contains a PGM parameter, not one that invokes a procedure. Similarly, if stepname.procstepname is coded, procstepname identifies an EXEC statement containing the PGM parameter in the procedure invoked by stepname.

The backward reference lets you copy previously coded information or refer to an earlier statement. The following parameters can make backward references:
  • DD CNTL refers to earlier CNTL statement
  • DD DCB refers to earlier DD statement to copy its DCB parameter
  • DD DSNAME refers to earlier DD statement to copy its DSNAME parameter, whether or not the data set is a partitioned data set, and whether or not the data set is a temporary data set
  • DD OUTPUT refers to earlier OUTPUT JCL statement
  • DD REFDD refers to earlier DD statement to copy its data set attributes
  • DD VOLUME=REF refers to earlier DD statement to use the same volume(s). The LABEL label type subparameter is also copied from the referenced DD statement.
  • EXEC PGM refers to an earlier DD statement that defines the program to be executed as a member of a partitioned data set
The following statements cannot be referenced:
  • DD * statement in DCB, DSNAME, or VOLUME parameter
  • DD DATA statement in DCB, DSNAME, or VOLUME parameter
  • DD DUMMY statement in VOLUME or UNIT parameter. The referring DD statement acquires a dummy status.
  • DD DYNAM statement
  • DD statement containing FREE=CLOSE in VOLUME or UNIT parameters
  • Nested procedure statements
  • Sysout DD statement
  • DD statement that is the target of a DDNAME= reference.
  • A DD statement containing a PATH parameter

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014