|
- In this example, the symbol parameters COUNTY, TOWN and STATE
are set by the SET statement. The EXPORT statement indicates that
the symbolic parameters COUNTY and STATE are to be made available
to the MYPROG program that is executed in STEP1:
//MYEXP EXPORT SYMLIST=(COUNTY,STATE)
//STEP1 SET COUNTY=DUTCHESS,TOWN=FISHKILL,STATE=NY
//STEP1 EXEC PGM=MYPROG
- Exported symbolic parameters are resolved to the most recent value
to which they are set. In the following example, MYPROG1 in STEP1
will receive an exported value of SYMVAL1 for SYM1. Subsequently,
the program MYPROG1 in STEP2 will receive an exported value of NEWSYMVAL
for SYM1. In STEP3, the exported value for SYM3 will be null, because
its value was not set prior to MYPROG1 executing in STEP3. In STEP4
and STEP5, MYPROG1 will receive the exported value of SYMVAL3 for
SYM3.
The value of SYMVAL2, for symbol SYM2, is made available
to all of the job steps following the export statement labeled MYEXPR1.
The value of SYMVAL1, for symbol SYM1, is made available to STEP1.
The updated value of NEWSYMVAL, for symbol SYM1, is made available
to STEP2 and the remaining job steps:
//MYEXPR1 EXPORT SYMLIST=(SYM1,SYM2)
// SET SYM1=SYMVAL1,SYM2=SYMVAL2
//STEP1 EXEC PGM=MYPROG1
//STEP2 EXEC PGM=MYPROG1
// SET SYM1=NEWSYMVAL
//MYEXPR2 EXPORT SYMLIST=SYM3
//STEP3 EXEC PGM=MYPROG1
//STEP4 EXEC PGM=MYPROG1
// SET SYM3=SYMVAL3
//STEP5 EXEC PGM=MYPROG1
|