Using Symbolic Variables

It can also be useful to specify the values to substitute as symbols rather than their actual value. You can then use a single Process for multiple purposes.

The following figure is an example of DGADTSUB that symbolically substitutes values into a z/OS job being submitted to the internal reader. IBM® Connect:Direct® supports any symbols that begin with an ampersand.

In the example, the second and subsequent parameters name the symbol, without the &, and value that the symbol becomes in the submitted job stream. IBM Connect:Direct substitutes the value itself when the Process is submitted.

DGADTSUB PROC SNODE=CD.OS39040.N1 NOTIFY=USER01 -
       &CLASS=A &DEST=LOCAL &JOB=JOB1SB -
       &RPTNAME=’’’RPT NAME’’’ -
       &FILE=X21.FILE -
       &JCL=X21.CNTL(SUBSUB)
*
*
       RUN TASK (PGM=DGADTSUB -
          PARM=(“DSN=dsname,DISP=SHR”, -
          “FILE       &FILE”, -
          “JOB        &JOB”, -
          “CLASS      &CLASS”, -
          “DEST       &DEST”, -
          “RPTNAME    &RPTNAME”, -
           )) PNODE