We have one distributed application that runs once a day, however we need to make some adjustment to run every time a file is created, all jobs need to have a qualifier " could be the number pass from a file", and also pass the same number to the argument. File could be created every 5 seconds.
Could you post more details on which system the file is created?
If you are going to monitor the file occurrence from ESP, I'd suggest to use WOBTRIG statement inside the event as mentioned below
EVENT ID(ITSSCHD.TESTGSN) SYSTEM(ESPM) REPLACEINVOKE 'ITNP.ESP.TESTPROC(TESTAPP1)' WOBTRIG FILE_TRIGGER Agent() - FileName('') CREATE/UPDATE
File name could also be a wild card statement, in such cases add an * at last.
As soon as event is triggered for a file arrival, %ESPWTFILE would store the complete input file along with whole path. You could use substring function to split the characters of the file and pass the same to Qualifier name and Arguments according to your requirement.
QUAL = SUBSTR(x,x,%ESPWTFILE)
UARG = SUBSTR(x,x,%ESPWTFILE)
Hope this information helps.#wobtrigs #esp_events
This is a windows OS, file trigger is going to be something like 'D:\Filename\ACC001.txt'. The ACC# is different every time it runs, however I want that number to be pass to qualifier and argument. I need to understand how the SUBSTR function work, does the drive and slash count as part of the stream?, if it doesn’t them it should look like the following example, please let me know If is ok.
The ‘*’ represent the field that need to be pass, which it could be ACC001, ACC002, etc, etc..
EVENT ID(ESP.APPL01) SYSTEM(ESPQA) REPLACE
WOBTRIG FILE_TRIGGER Agent(SERVERNAME03) -
QUAL = SUBSTR(8,6,%ESPWTFILE)
WARG = SUBSTR(8,6,%ESPWTFILE)
If your file is going to be D:\Filename\ACC001.txt then %ESPWTFILE would have the complete file name as I already mentioned. so while doing SUBSTR, You would need to count each character as 1 which would also include space if there is any.
I've just re-modified the same example you took.
FileName('D:\Filename\*') CREATE/UPDATE - Changed this from 'D:\Filename\*.txt' to 'D:\Filename\*' to process wildcard
QUAL = SUBSTR(13,7,%ESPWTFILE) - changed the values considering total length of the file name as 22
WARG = SUBSTR(13,7,%ESPWTFILE)
Hope it helps !!