Hi All,
Description of problem
I am trying a difference approach of solving the same problem I having to fine tune ESP coding.
I want TWGASCS1 to run with global variable FLAG1 = 'N' and the value will only change once dataset trigger DATA1 completed. Later job TWGSASCS1.001 will then run with global variable FLAG ='Y' and pass it value to local variable switch.
I am unable to pass value 'Y' to my global variable in DSTRIG DATA1 . the value of FLAG1 is still 'N'
What am I doing wrong and how to fix it. My codes as bellow. Kindly advice
APPL TEST
VSET FLAG1 N TABLE(TEST) /* This is to initialize the value from previous run
JOB TWGASCS1
SUBAPPL TEST01 WAIT
RUN TODAY
ENDJOB
DSTRIG DATA1
DSNAME 'ORMA001.TEST.DATA' ANYCLOSE
SUBAPPL TEST01 WAIT
RUN WORKDAY
FLAG1 = 'Y'
VPUT FLAG1 TABLE(TEST) /assign value 'Y' to global variable FLAG1
RELEASE ADD(TWGASCS1.001)
ENDJOB
JOB TWGASCS1.001
SUBAPPL TEST01 WAIT
VGET (FLAG1) TABLE(TEST)
SWITCH = %FLAG1
SE 'JOB2 VALUE FLAG1 = %FLAG1 AND SWITCH %SWITCH' USER(ORMA001) /*display the value of FLAG1
RUN TODAY
ENDJOB
output of my display as bellow
JOB2 VALUE FLAG1 = N AND SWITCH N ESP(ORMA001)
MSA