ESP Workload Automation

  • 1.  Abandon submission for File trigger

    Posted Jan 17, 2013 03:27 PM
    I have a appl that I need to be abandon before the next run comes in the queue. My application has a file trigger and when I put the abandon submission statement in the application within the file trigger it didn't work so now I am manuallly clearing out the file trigger each day....appl below...How can I get around this?

    000003 APPL PDW1112U
    000004
    000005 filepath='/data/inform/edw/refdata/targetfiles'
    000006
    000007 FILE_TRIGGER REFDATA1
    000008 AGENT PROD-INFORM-ESP
    000009 FILENAME %filepath/dw1110u_refdata_trigger_file.out CREATE
    000010 RELEASE PDW1112U
    000011 RUN ANY
    000012 ENDJOB
    000013
    000014 JOB PDW1111U EXTERNAL
    000015 RUN TODAY
    000016 RELEASE PDW1112U
    000017 ENDJOB
    000018
    000019 HPUX_JOB PDW1112U
    000020 AGENT PROD-INFORM-ESP
    000021 SCRIPTNAME /data/inform/edw/esp_scripts/pdw1112u.esp
    000022 RUN TODAY
    000023 ABANDON SUBMISSION NOW PLUS 15 MINUTES
    000024 RELEASE TRIG.PDW1112U
    000025 ENDJOB


  • 2.  RE: Abandon submission for File trigger

    Posted Jan 17, 2013 04:52 PM
    Jerri,
    As the file_Monitor is active it has already been submitted ... thus the Abandon Submission would not work for your situation ... what I suggest you do is create a self-completing task that would launch at the abandon submission time you wanted, to force complete your File_Monitor and any subsequet jobs you need not run ... (just remember to bypass successor jobs before you complete the file_monitor otherwise you will cause them to start running inadvertantly.) ... you would then imbed an esp command to force complete the self-completing task in one of your succesor jobs so that the process cleans itself up when the file does arrive before the abandon time.
    Hope that helps.


  • 3.  RE: Abandon submission for File trigger

    Posted Jan 17, 2013 05:06 PM
    I think the issue is related to how the FILE_TRIGGER Workload Object(WOB) works.

    When the FILE_TRIGGER WOB runs it sends an Automated Framework Message (AFM) to the Agent. From that point on the Agent is looking for the file to be created, when the file is created the Agent sends and AFM back to the Workload Scheduler and the FILE_TRIGGER WOB is marked as complete.

    When you do an abandon submission in the Workload Scheduler it is too late for the FILE_TRIGGER WOB. This is similar to a boat that has already left the pier.

    I am not sure if I understand what you are trying to do.

    Why do you need to manually clear the trigger every day?

    If you added code similar to what is shown below will that help?

    [font=Courier New]PROCEDURE_SECTION:

    IF ESP_APPL_GEN=1 THEN DO
    SEND '>> PDW1112U ALREADY ACTIVE - EXITING' USER(*)
    SEND '>> FILE_TRIGGER is currently waiting for file creation' USER(*)
    IF NOT COMPLETED('PDW1112U','ALL') THEN EXIT
    ENDDO

    APPL PDW1112U [font]

    If the application runs daily but a file is not created the next day when the application is scheduled to run it will see an active application and exit.


  • 4.  RE: Abandon submission for File trigger

    Posted Jan 18, 2013 07:48 AM
    You could try something like this....

    JOB REFDATA1.FILE TASK PROCESS
    RUN ANY
    ESP AJ REFDATA1 COMPLETE APPL(APPLNAME.%ESPAPGEN)
    ESP AJ REFDATA1.FILE COMPLETE APPL(APPLNAME.%ESPAPGEN)
    ENDJOB

    Sherri