How to extract GDG G0000v00 number from %ESPTRDSN symbolic variable.
search cancel

How to extract GDG G0000v00 number from %ESPTRDSN symbolic variable.

book

Article ID: 135075

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

When using DSTRIG and creating a GDG dataset how can I retrieve the generation number and use as a variable in JCL of jobs triggered.


Environment

Release : 11.4

Component : CA ESP WORKLOAD AUTOMATION

Cause

Need to retrieve Generation Number from ESP variable ESPTRDSN.

Resolution


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=CYB.ESP.LIST.LEVEL.%GEN     

//SYSIN DD DUMMY

//SYSUT2 DD DISP=(NEW,CATLG,DELETE),

// DSN=CYB.ESP.LIST.ABEND(+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=CYB.ESP.LIST.LEVEL.G0021V00    

//SYSIN DD DUMMY  

//SYSUT2 DD DISP=(NEW,CATLG,DELETE),  

// DSN=CYB.ESP.LIST.ABEND(+1),  

// SPACE=(CYL,(1,1),RLSE),  

// UNIT=SYSDA,  

// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)  

//SYSIN DD DUMMY