ESP Workload Automation

  • 1.  Overdue with a dynamic time frame?

    Posted Jul 07, 2016 01:36 PM

    Can an overdue statement use a dynamic time frame based on when its predecessor finishes? 

    For example, can it work so that once the predecessor finishes, this job kicks off and becomes overdue

    after X number of hours?  As an example, perhaps today the pred completes at 15:00 and would be overdue 4 hours later (19:00).  Tomorrow the job completes at 13:00, still using a 4 hour time frame and would become overdue at 17:00.

    If an overdue wont' work, is there a command that can be manipulated by calculating time?  Any suggestions are most appreciated.



  • 2.  Re: Overdue with a dynamic time frame?

    Posted Jul 07, 2016 02:54 PM

    Add this code fragment after the DUEOUT statement and before the NOTIFY OVERDUE statement  in your JOB/ENDJOB block of the job you wish to reset the time dependency for. It will set the late end time for 4 hours after the job becomes "READY" for submission.

     

    IF ESP_APPL_PROC THEN +                                           

        DO                                                            

          ESPNOMSG APPLJOB %ESPAPFULLNAME APPL(%ESPAPPL..%ESPAPGEN) + 

          RESET LATEEND('REALNOW PLUS 4 HOURS')                       

        ENDDO                                                        



  • 3.  Re: Overdue with a dynamic time frame?

    Broadcom Employee
    Posted Jul 07, 2016 03:52 PM

    Would agree with Michael's method. Another way is to set MAXRUNTIME = 60 (for one hour) for the job, then if it runs over 1 hour, it will show as overdue.

     

    See more about MAXRUNTIME on "User's Guide.

     

    Lucy



  • 4.  Re: Overdue with a dynamic time frame?

    Posted Jul 07, 2016 04:25 PM

    If the jobs can be separated into 2 ESP PROCs the following could also be used.

     

    Use the DUEOUT and REALNOW (the trigger time of the corresponding Event).

     

     

    PROC1

     

    JOB1

    .

    .

      RUN ANYDAY

      RELEASE TRIGJOB

    ENDJOB

     

    JOB TRIGJOB
    LINK PROCESS        

      ESPNOMSG TR <EVENT PREFIX>.PROC2 

      RUN ANYDAY        

    ENDJOB                         

     

     

     

    PROC2

     

    JOB2

    .

    .


    DUEOUT EXEC REALNOW PLUS 4 HOURS

      RUN
    ANYDAY

    ENDJOB         



  • 5.  Re: Overdue with a dynamic time frame?

    Posted Jul 08, 2016 01:20 PM

    Thanks for the suggestions.  I will work with these and see what works best for our situation.



  • 6.  Re: Overdue with a dynamic time frame?

    Broadcom Employee
    Posted Jul 15, 2016 10:37 AM

    Hi Barb,

     

    Any updates?

     

    Does any of the suggestions work for you?

     

    Thank you,

     

    Lucy



  • 7.  Re: Overdue with a dynamic time frame?

    Posted Jul 18, 2016 07:26 AM

    I have tried some things but will no success.  I think the problem is that we load at one time (consistent), the jobs may not run for several hours (take off time is inconsistent), so the successor job that they want to change the overdue statement on is already loaded and it appears the overdue time cannot change once loaded.  They are unwilling to 1.  separate this into 2 separate appls or 2. wait to load the appl until ready to run.  We may need to leave things as they are for now - we were attempting to improve things so this will not cause undue hardship if we leave things as they are.  I do appreciate everyone's help on this.



  • 8.  Re: Overdue with a dynamic time frame?

    Broadcom Employee
    Posted Jul 18, 2016 08:37 AM

    Hi Barb,

     

    Sorry to hear that. Would you like to share what you have done? And we can see if anything was overlooked somehow. All the 3 methods should work for the scenario: take off time is inconsistent.

     

    Let me explain a bit more about using MAXRUNTIME:

    JOB AA

    REL BB

    RUN ANY

    ENDJOB

     

    JOB BB

    RUN ANY

    MAXRUNTIME = 240 /* the minutes value for 4 hours*/

    NOTIFY OVERDUE EVENT(TEST.OVERDUE)

    ENDJOB

     

    No matter when JOB AA completes, the JOB BB will be marked as overdue after 4 hours.

     

    Lucy



  • 9.  Re: Overdue with a dynamic time frame?

    Posted Jul 21, 2016 08:53 AM

    I think I misunderstood your suggestion the first time.  Let me try this and see what happens.  I will be in touch.  Thanks for your help --- it is very much appreciated.