When using DSTRIG and creating a GDG dataset on ESP Workload Automation, how to retrieve the generation number and use it as a variable in the JCL of the triggered jobs?
Component: ESP WORKLOAD AUTOMATION
Release: ALL
1) Add the following to ESP Proc:
INTEGER X
X=LENGTH(ESPTRDSN)
GEN='%ESPTRDSN(%X-7:%X-0)'
2) Update JCL with symbolic variable GEN created above:
//STEP1 EXEC PGM=IEBGENER,REGION=4000K
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=HLQ.GDG.DATASET.ONE.%GEN
//SYSIN DD DUMMY
//SYSUT2 DD DISP=(NEW,CATLG,DELETE),
// DSN=HLQ.GDG.DATASET.TWO(+1),
// SPACE=(CYL,(1,1),RLSE),
// UNIT=SYSDA,
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSIN DD DUMMY
EXAMPLE of OUTPUT when job executed:
//STEP1 EXEC PGM=IEBGENER,REGION=4000K
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=HQL.GDG.DATASET.ONE.G0021V00
//SYSIN DD DUMMY
//SYSUT2 DD DISP=(NEW,CATLG,DELETE),
// DSN=HLQ.GDG.DATASET.TWO(+1),
// SPACE=(CYL,(1,1),RLSE),
// UNIT=SYSDA,
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSIN DD DUMMY