ESP Workload Automation

 View Only
  • 1.  How to RELEASE two different jobs base on the status of a File trigger

    Posted Dec 29, 2017 09:00 AM

    I need to trigger either UNIX jobs JOBNAME1 or JOBNAME2 base on the NORMAL or ABNORMAL completion of the File Trigger, however the simulation is failing. If condition is NORMAL then release JOBNAME1, else if condition is ABNORMAL release JOBNAME2.  Does anyone has a suggestion or resolution to this issue ?

     

    APPL APPL001

    AGENT unixagent
    USER='User001'

    SYMB1 ='SYMB1'
    Symb2 ='SYMB2'

     

      FILE_TRIGGER FT1.%SYMB1%SYMB2
        FILENAME /Filename/data/%SYMB2 EXIST NOCHANGE(2)
        RELEASE ADD(JOBNAME2.%SYMB1%SYMB2(A))
        RELEASE ADD(JOBNAME1.%SYMB1%SYMB2)
        RUN WORKDAYS
      ENDJOB

     

      UNIX_JOB JOBNAME1.%SYMB1%SYMB2
        SCRIPTNAME /Filename/bin/File.sh
        RUN WORKDAYS
      ENDJOB

     

      UNIX_JOB JOBNAME2.%SYMB1%SYMB2
        SCRIPTNAME /Filename/bin/File-extra.sh
        RUN WORKDAYS
      ENDJOB



  • 2.  Re: How to RELEASE two different jobs base on the status of a File trigger

    Broadcom Employee
    Posted Jan 02, 2018 08:50 AM

    Hi Charlie,

     

    I have added the tag and subcategory for your post, so that the correct group of users can see your questions.

     

    The confusion is related to '(A)' which can be considered as part of variable %SYMB2. 

     

    You can add '.' after %SYMB2, then ESP will know '(A)' is not related to this variable, like:

    RELEASE ADD(JOBNAME2.%SYMB1%SYMB2.(A))

     

    My test here works as expected.

     

    Hope this helps,

     

    Lucy



  • 3.  Re: How to RELEASE two different jobs base on the status of a File trigger

    Posted Jan 05, 2018 11:28 AM

    Lucy, Your resolution to the problem work, however when the file does not exist the file_trigger stays red and the application does not complete, we do not want to use another job with an ESP command to complete the application. Do you know a way to complete the FILE_TRIGGER when the file does not exist ?



  • 4.  Re: How to RELEASE two different jobs base on the status of a File trigger
    Best Answer

    Posted Jan 05, 2018 12:43 PM

    I tested the excerpt below and it completes the APPL without additional jobs.

     

    Will that work for you?

     

     

    FILE_TRIGGER FT1.%SYMB1%SYMB2
      FILENAME /Filename/data/%SYMB2 EXIST NOCHANGE(2)
      RELEASE ADD(JOBNAME2.%SYMB1%SYMB2(A))
      RELEASE ADD(JOBNAME1.%SYMB1%SYMB2)
      RUN WORKDAYS
    ENDJOB

     

    UNIX_JOB JOBNAME1.%SYMB1%SYMB2
      SCRIPTNAME /Filename/bin/File.sh
      ESPNOMSG AJ JOBNAME2.%SYMB1%SYMB2 COMPLETE APPL(APPL001.0) 

      RUN WORKDAYS
    ENDJOB

     

    UNIX_JOB JOBNAME2.%SYMB1%SYMB2
      SCRIPTNAME /Filename/bin/File-extra.sh
      ESPNOMSG AJ JOBNAME1.%SYMB1%SYMB2 COMPLETE APPL(APPL001.0)
      ESPNOMSG AJ FT1.%SYMB1%SYMB2 COMPLETE APPL(APPL001.0)
      RUN WORKDAYS
    ENDJOB