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. This is a way to reduce or simplify the coding in JCL. The information that is referred back should be in the same JOB.
In a DD statement, we can referback DCB, VOL, DSN
Parameter=*.StepName.DDname PGM=*.LKED.SYSLMOD DSN=*.StepName.DDName
If the DD name points to a DD statement in the same job step, you can omit the stepname.
The following statements cannot be referenced:
Example of DD statement referback
//JOB1 JOB ... //STEPA EXEC ... //DD1 DD DSNAME=REPORT . . //DD4 DD DSNAME=*.DD1
Example of STEP statement referback
//JOB2 JOB ... //STEP1 EXEC ... //DDA DD DSNAME=PGPUB.FILE . . //STEP2 EXEC ... //DDB DD DSNAME=*.STEP1.DDA
Example JCL referback to catalogued procedure.
//PS1 EXEC ... . . //PSTEP1 EXEC ... //DS1 DD DSNAME=DATA1 //PSTEP2 EXEC ... //DS2 DD DSNAME=DATA2 . The job referback to PROC DS1 and DS2 dataset //JOB5 JOB ... //CALLER EXEC PROC=PROC1 . //REF1 DD DSNAME=*.CALLER.PSTEP2.DS2 //NEXT EXEC ... //REF2 DD DSNAME=*.CALLER.PSTEP1.DS1