PROC parameters substitution

Top  Previous  Next

JCLs coming from MVS, OS/390 and z/OS can make use of dynamic override for PROC parameters and DD. Cataloged PROCs, as well as JCLs, are converted in C/Korn shell scripts. To replicate the dynamic substitution feature, the XDSH utilities must be used:

xdinit
xdadd
xdsh

xdinit called at the beginning of the caller script, to initialize the XDSH system.

xdadd is the equivalent of a DD statement: it defines what and where must be actualized in the called script (PROC).

xdsh takes care to prepare and execute the called script.

Sample

#!/bin/csh
#
#
source $HOME/etc/xjobinit.csh
xdinit
STEP01:
# //EXEC PROC01,P1=X,P2=D
# //STEP1.FILEIN DD DSN=ANAG.CAT1,DISP=SHR
# //STEP1.FSKED  DD *
# //01012003 31122003 ALL
# //01012003 31122003 OPEN
# //*
# //STEP1.SYSIN DD *
# //LOAD SKED
# //PRINT
# //*
set STEPNAME=STEP01
xdisplay "step $STEPNAME running..."
xdadd STEP1 "setenv dlbl_FILEIN='ANAG.CAT1,disp=SHR'
xdadd --file STEP1 FSKED <<end_of_file
01012003 31122003 ALL
01012003 31122003 OPEN
end_of_file
xdadd --stdin STEP1 <<end_of_file
LOAD SKED
PRINT
end_of_file
xdsh PROC01
set RC=$status

Requirements

XDSH tools require the following environments:

PID containing the PID number of the main JCL.

PROCLIB containing the path for PROCs.

Both them must be set and exported at the beginning of the main JCL.