around each VSET job. That worked. thank you very much for your great help. Have a great weekend.
Original Message:
Sent: Mar 15, 2024 01:34 PM
From: Lucy Zhang
Subject: ESP Global Variables
Hi Don,
I believe now I know the problem. The command like VSET in ESP Proc can run twice, once at application generation time, and once at process time. If you check your ESP auditlog, you should find that ALL 4 VSET ran when the application is created and then one VSET ran afterwards, together with the triggered root job.
One way is to add IF logic, so that the VSET will only run at process time, like below:
IF ESP_APPL_PROC THEN DO
VSET WNZCE055_FW 'REQUEST' TABLE(FCGVARD3)
ENDDO
And if the 4 TASKs are meant to change the variable values only, they may NOT be needed at all. You can trigger the event with USER1 (contains the variable name) and USER2 (contains the value) variables:
TRIGGER ESP.GTV USER1(WNZCE053_FW) USER2(REQUEST)
And in ESP Proc:
APPL .....
IF %USER1 EQ '' THEN EXIT
IF %USER2 EQ '' THEN EXIT
IF ESP_APPL_GEN THEN DO
/* VSET will run at application generation time*/
VSET %USER1 %USER2 TABLE(FCGVARD3)
ENDDO
Hope this helps,
Lucy
Original Message:
Sent: Mar 15, 2024 12:55 PM
From: Donald Suekama
Subject: ESP Global Variables
Here is the sample of the table
-
* TABLE NAME: FCGVARD3 ESP SYSTEM : EST2
*
WNZCE053_FW='NOREQUEST'
WNZCE055_FW='REQUEST'
So if I trigger WNZC_D3_SET_REQUEST_WNZCE053_FW (Setting the variable WNZCE053_FW to REQUEST) the results are below
-
* TABLE NAME: FCGVARD3 ESP SYSTEM : EST2
*
WNZCE053_FW='REQUEST'
WNZCE055_FW='NOREQUEST'
Which changes 053 but also changed 055 which was not intended.
Original Message:
Sent: Mar 14, 2024 05:09 PM
From: Lucy Zhang
Subject: ESP Global Variables
Hi Don,
Did you issue VGET to retrieve the global variable value before using it?
There shouldn't be any problem to have two variables in the same global variable table.
Hope this helps,
Lucy
Original Message:
Sent: Mar 13, 2024 01:46 PM
From: Donald Suekama
Subject: ESP Global Variables
I am trying to use Global variables table to set a variable to control if a job is on REQUEST or NOREQUEST. So, I can put one variable into the table and things work as planned but if I have two variables (let say VAR050 & VAR060) it seems to Toggle the second variable when I only set the first variable.
My APPL is used ADHOC and I have 4 jobs. Two jobs per variable. The two jobs are "VSET VAR050 'REQUEST' TABLE(FCGVARD3)" and "VSET VAR050 'NOREQUEST' TABLE(FCGVARD3)". the same for the other variable VAR060.
Does anybody have any issues with Global Variable Tables? We do not use GVT very much with our company.
Thank you for any help.
ps. I also tried VPUT. Not sure the big difference between the two in net results.