Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 4: JCL DD Statement


REFERBACK

The backward reference or refer back is used to reference information from previous JCL statements in the job stream. Asterisk is used as refer-back operator. This help in reducing and simplifying JCL code.

Using this feature, we can refer-back parameters: DSN, DCB, VOL, OUTPUT and PGM. We can make use of refer back using following ways

  • *.DDNAME :- This way we can refer another DD in the same step
  • *.STEPNAME.DDNAME :- This way we can refer another DD in another step
  • *.STEP-INVOKING-PROC.PROC-STEP.DDNAME :- This way we can refer another DD in step that is in proc

  • Note:- Asterisk in SYSOUT parameter refers back to MSGCLASS of JOB CARD

Example :-

//JOB1 JOB A123,’STEVE’ //STEP1 EXEC PGM=PROGRAM1 //DDNM1 DD DSN=DEPT1.EMP1.DATA1, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA //DDNM2 DD DSN=DEPT1.EMP1.DATA2, // DISP=(NEW,CATLG,DELETE), // UNIT=3380 //DDNM3 DD DSN=*.DDNM1, // DISP=(NEW,CATLG,DELETE), // UNIT=3380 //STEP2 EXEC PGM=PROGRAM2 //DDNM12 DD DSN=*.STEP1.DDNM1






© copyright mainframebug.com
Privacy Policy