Symbolic Parameters Example


Scenario1 - Define and use symbolic parameters within a JCL job.

Actual Code -

//      SET  PROG=CBLPROG
//STEP1 EXEC PGM=&PROG

Replaced Symbolic Parameters -

//      SET  PROG=CBLPROG
//STEP1 EXEC PGM=CBLPROG

Scenario2 - Using Symbolic Parameter in Procedures

Procedure Definition (PROC1) -

//MYPROC PROC,PROG=PROG1
//STEP1  EXEC PGM=&PROG
//INFILE DD   DSN=MTH.INPUT.DATASET,DISP=SHR

Job Invoking the Procedure -

//MYJOB JOB  ...
//STEP1 EXEC MYPROC,PROG=CBLPROG

Scenario3 - Using Symbolic Parameter for full file in Procedures

Procedure Definition (PROC1) -

//MYPROC PROC,PROG=PROG1,
//            INPFILE=MTH.INPUT.FILE1
//STEP1  EXEC PGM=&PROG
//INFILE DD   DSN=&INPFILE,DISP=SHR

Job Invoking the Procedure -

//MYJOB JOB  ...
//STEP1 EXEC MYPROC,PROG=CBLPROG,
//           INPFILE=MTH.INPUT.FILE

Scenario4 - Using Symbolic Parameter for a high-level qualifier in Procedures

Procedure Definition (PROC1) -

//MYPROC PROC,PROG=PROG1,HLQ=MTH1
//STEP1  EXEC PGM=&PROG
//INFILE DD   DSN=&HLQ..INPUT.FILE,DISP=SHR

Job Invoking the Procedure -

//MYJOB JOB  ...
//STEP1 EXEC MYPROC,PROG=CBLPROG,
//           HLQ=MTH