Hi,
We have a setup as below:
A dataset (HLQ1.HLQ2.HLQ3) has list of events that will be triggered one by one using REXX:
ABC.PROD1
ABC.PROD2
ABC.PROD4
ABC.PROD9
ETC..
And below REXX code in my appl proc:
REXXON
"ALLOCX DA('HLQ1.HLQ2.HLQ3') F(MYINDD) SH"
IF RC \= 0 THEN
DO
"REEXEC IN(1)"
"EXIT"
END
ADDRESS MVS "EXECIO * DISKR MYINDD (STEM A. FINIS"
DO I=1 TO A.0
X2=A.I
"ESP TRIGGER "X2
END
"FREEX FILE(MYINDD)"
REXXOFF
I want to trigger an event and wait for its completion , then only trigger the next event. I thought about SLEEP function in REXX, but the time each application takes to complete differs and would not be good idea in case the system is overloaded.
FYI, the application names are different but have few characters in common, but all the events have 3 jobs and have same job name in all of them.
Please share your ideas on this.