Historically, IBM has implemented symbolic variables only in PROCs. With recent releases of MVS/ESA, IBM has finally implemented symbolic variables in JCL. The symbolic variables in JCL are assigned values by the SET JCL statement.

IBM almost got it right this time! They still have not implemented symbolics in SYSIN.

DR0063CP has implemented symbolics in SYSIN. DR0063CP emulates the JCL SET for any symbolic variables imbedded in SYSIN records. The symbolic variables and their associated values are passed to DR0063CP as parameters using the SET statement. The SYSIN records are then read, parsed into tokens, and analyzed for symbolic variables. If any symbolics are found, they are replaced by the appropriate value, and the SYSIN record’s tokens are re-assembled into normal form. The SYSIN records are written to an output file after re-assmbly. The resultant file is then available to be passed as input to subsequent job steps.

DR0063CP can be used effectively for SYSIN data sets that contain data set names, such as IDCAMS DELETE/DEFINE commands.

Example: A variable sort.

// SET LEN=8

// SET START=12

.

.

//STEP001 EXEC PGM=DR0063CP,

// PARM=’START=&START,LEN=&LEN’

//*

//SYSIN DD DSN=NPAPPL.HOSPEXCD(VARSORT),DISP=SHR

//OSYSIN DD DSN=&&SYSIN,

// DISP=(NEW,PASS),

// UNIT=VIO,

// SPACE=(TRK,1),

// DCB=(LRECL=80,BLKSIZE=8000)

.

.

//STEP002 EXEC PGM=SORT

//SYSIN DD DSN=&&SYSIN,DISP=(SHR,PASS)

.

.

"SORT FIELDS=(&START,&LEN,CH,A)" ß NPAPPL.HOSPEXCD

"SORT FIELDS=(12,8,CH,A)" ß &&SYSIN