CA Workload Automation ESP Edition

Expand all | Collapse all

FILE_TRIGGER exitcode

Jump to Best Answer
  • 1.  FILE_TRIGGER exitcode

    Posted 12-10-2015 11:48 AM

    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.



  • 2.  Re: FILE_TRIGGER exitcode
    Best Answer

    Posted 12-10-2015 11:57 AM

    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:

    • AIX (AIX_JOB)
    • HP-UX (HPUX_JOB)
    • i5/OS (AS400_JOB)
    • Linux (LINUX_JOB)
    • OpenVMS (OPENVMS_JOB)
    • Remote Execution (PROXY_JOB)
    • Solaris (SUN_JOB)
    • Tandem NSK (TANDEM_JOB)
    • UNIX (UNIX_JOB)
    • Windows (NT_JOB)

     

     

    FILE_TRIGGER is not a supported job type for EXITCODE.

     

    What are you trying to accomplish?

     

     



  • 3.  Re: FILE_TRIGGER exitcode

    Posted 12-10-2015 01:44 PM
      |   view attached

    I need to determine when a directory is empty before I can bring in the next process.

     

    Don Roberts

    Production Scheduler,  GTO

    Software Change & Configuration Management

    Change Management Group

    voice: 610.244.2843 ◊ Fax: 610-244.5017

    cell: 267.933.7349



  • 4.  RE: Re: FILE_TRIGGER exitcode

    Posted 29 days ago
    Hello Don. Is there a deadline for files showing up in the directory being monitored? If no files in directory by 09.30, then they are not going to show up for this generation? I ask because I often put time logic for FILE_TRIGGER in the successor to the FILE_TRIGGER.

    Would it work to have the Successor to the FILE_TRIGGER include an OVERDUE consideration? At a certain time, if the successor has not begun because the FILE_TRIGGER is still in Monitor state, then have the successor complete the FILE_TRIGGER.

    Or perhaps ABANDON DEPENDENCIES on the Successor, which would have your job stop waiting for FILE_TRIGGER.  I'm not sure if you would have to clean up FILE_TRIGGER for the current generation with this idea. 

    ------------------------------
    Cigna
    ------------------------------



  • 5.  RE: Re: FILE_TRIGGER exitcode

    Posted 29 days ago
    Hi, 
    Sorry if you get two replies but I don't see my original reply here. 

    There is no automatic deadline for file monitors. Some files may show up in an hour and some may not show up for a month. 

    You are correct it is best to put in DUEOUT times in the file monitors.  For ex. If the file hasn't arrived from the bank by 9am have an ALERT trigger and notify the application team that they need to check into it. 

    Normally, the file that arrives needs to be processed by the next job. ABANDON dependencies on the next job may cause it to fail since there is no data OR it may read the incorrect(yesterday's) data. 

    If the job can run without data then it is possible to ABANDON the dependencies. Then complete the file trigger job using an AJ command. 

    Don




  • 6.  Re: FILE_TRIGGER exitcode

    Posted 12-10-2015 12:11 PM

    Let me ask:

    What causes the RC 1?

     

    2cents...



  • 7.  Re: FILE_TRIGGER exitcode

    Posted 12-10-2015 03:16 PM

    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



  • 8.  Re: FILE_TRIGGER exitcode

    Posted 12-10-2015 03:24 PM

    Does NOTEXIST provide what you need?

     

    NOTEXIST
    Indicates 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         
                                                          



  • 9.  Re: FILE_TRIGGER exitcode

    Posted 12-10-2015 03:48 PM

    Rick,

     

    Thanks for your help.  I have already tested the File Trigger using the EXIST and NOEXIST parameters. The dilemma is, I need
    to 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 Failed
    Status.  If I use the NOTEXIST, then the File Trigger will fail multiple times before the Directory path is actually
    empty.  I am trying to prevent a FAILED job status.



  • 10.  Re: FILE_TRIGGER exitcode

    Posted 12-10-2015 04:14 PM

    What is the server OS type you are checking for an empty directory?



  • 11.  Re: FILE_TRIGGER exitcode

    Posted 12-11-2015 08:16 AM

    An alternative?

    Connect your file trigger to an alert.

    IF (%MNJOB='LDBFTRIG' AND %MNCMPC='1') then

    do

       ESPNOMSG AJ %MNJOB COMPLETE APPL(%MNAPPL..%MNAPPLGEN)

    enddo

    ...or something like that.

     

    HTH...good luck....don t./wag.....



  • 12.  RE: FILE_TRIGGER exitcode

    Posted 07-11-2019 04:59 PM
    Did you every figure out how to make cc=1 a successful run?  I need the CCF (Condition Code Failure) field to be NO for a CC=1.  This is being counted as an unsuccessful execution, even though  a CC 0 or 1 is considered successful for this FILE_TRIGGER WOB.  I even tried to use CCCHK statements to make CC=1 acceptable, but YES still appears in the CCF field and this is counted as a failure in my reports.  Here is the FILE_TRIGGER wob definition I used.

    FILE_TRIGGER JOBNAME.FILECHK                                        

       RUN MON TUE WED THU FRI                                            

       CCCHK RC(0:1) OK                                                    

       CCCHK RC(2:4095) FAIL                                              

       EARLYSUB 15:00                                                      

       RELEASE ADD(JOBNAMEA) COND(RC(0))                                  

       RELEASE ADD(JOBNAMEA.BYPASS) COND(NOT RC(0))                        

       AGENT AGENTNAME                                                      

       USER USERID                                                        

       MAXRUNTIME=0                                                        

    FILENAME +                                                          

       '\\SERVERNM\apps\ears\*.RPLY' EXIST                                

    ENDJOB                                                                


      

    JOBNAME                            WT   APPL     APPLGE  RC CCF AGENT       START   
                                                         NAME                                                          DATE    
    JOBNAMEA.FILECHK         FM AMVRC01    3342    1 YES SERVERNM TUE 9JUL1 
    JOBNAMEA.BYPASS                AMVRC01    3342    0 NO                        TUE 9JUL1
                                             ​

    ------------------------------
    IT Systems Engineer Sr.
    Progressive Insurance
    Ohio
    ------------------------------



  • 13.  RE: FILE_TRIGGER exitcode

    Posted 07-12-2019 05:15 PM
    Hi John,

    CCCHK works only for mainframe workloads. 

    Lucy