We currently have logic built into several applications where a new generation will not build if there is currently an active generation;
IF %ESP_APPL_PROC = 0 AND %ESPSADG = 0 THEN +
DO
IF NOT COMPLETED('%ESPAPPL','ALL') THEN EXIT
ENDDO
This logic is working in all cases, except one. When we use an Event level file trigger and multiple files come in simultaneously. If this happens, multiple generations of the application build.
EVENT ID(PRSCHED.DEMO01) SYSTEM(-) REPLACE
CALENDAR FISCAL
INVOKE 'A079011.ESP.PROCLIB(DEMO01)'
WOBTRIG FILE_TRIGGER Agent(SCWKLDT1) -
FileName('D:\TEST\eric\TEMP000\test\COUNT*.txt') CREATE -
State(Monitored) Status('Monitored for CREATE')
For example, if 3 files that match the trigger criteria come in together, 3 generations will build. We cannot get any more specific with the file names, it has to remain any text file named count***.txt Any thoughts how prevent multiple generations building? No matter how many files come in we only want one generation to build and run. And no other generations to build while the current gen is active. Thank you.