How can I force a File Trigger to accept a Condition Code 1 and not be listed as failed?
EXITCODE 1 SUCCESS does not work.
According to the CA Workload Automation ESP Edition Command Reference Guide Release 11.4
Supported Job Types - this statement is optional for the following job types:
FILE_TRIGGER is not a supported job type for EXITCODE.
What are you trying to accomplish?
I need to determine when a directory is empty before I can bring in the next process.
Production Scheduler, GTO
Software Change & Configuration Management
Change Management Group
voice: 610.244.2843 ◊ Fax: 610-244.5017
Let me ask:
What causes the RC 1?
The File Trigger is using the EXIST parameter to check if the Directory path is empty. I need to know when the path is empty before I can submit the next process. I am OK with it passing the "1" when the path is empty, but I don't want the job being listed as failed
Does NOTEXIST provide what you need?
NOTEXISTIndicates that the file trigger occurs if the file does not exist. If the file exists, the job fails.
PROCEDURE_SECTION: AGENTNAME=<agent name>PATH="<directory>" FILEMASK="*" APPL FILETRIG WAIT FILE_TRIGGER FILETRIG AGENT %AGENTNAME FILENAME '%PATH%FILEMASK' NOTEXIST RUN DAILY ENDJOB
When I run the job above and there is at least one file in the directory:
Job Name Agent Name Gen# ApplName CCode Job Status ___ FILETRIG AGENTNAME 3 FILETRIG 1 File Exists
When I run the job above and there are NO files in the directory:
Job Name Agent Name Gen# ApplName CCode Job Status ___ FILETRIG AGENTNAME 3 FILETRIG 0 File does not exist
Thanks for your help. I have already tested the File Trigger using the EXIST and NOEXIST parameters. The dilemma is, I needto know when the Directory path is empty. If I use the EXIST parameter, I can run that until I get the Condition Code 1, but the final File Trigger is in FailedStatus. If I use the NOTEXIST, then the File Trigger will fail multiple times before the Directory path is actuallyempty. I am trying to prevent a FAILED job status.
What is the server OS type you are checking for an empty directory?
Connect your file trigger to an alert.
IF (%MNJOB='LDBFTRIG' AND %MNCMPC='1') then
ESPNOMSG AJ %MNJOB COMPLETE APPL(%MNAPPL..%MNAPPLGEN)
...or something like that.
HTH...good luck....don t./wag.....
RUN MON TUE WED THU FRI
CCCHK RC(0:1) OK
CCCHK RC(2:4095) FAIL
RELEASE ADD(JOBNAMEA) COND(RC(0))
RELEASE ADD(JOBNAMEA.BYPASS) COND(NOT RC(0))