ESP Workload Automation

  • 1.  Use Of Dataset Trigger And Delay Statement

    Posted Nov 14, 2017 05:26 PM

    Greetings!  I'm new to the site, so bear with me. 

     

    I've been doing basic Workload Automation for about a year now, and am now running into new territory (for me) and would like some guidance.  We have a yearly process that can happen any day of the week during work hours; however the file that is created must be loaded into our web environment during a very short window on Sunday evening.  The work order process cannot be delayed as we have other business partners that rely on the yearly file once our analysts say it's time to execute the process, but the file load to the web process must happen Sunday evening at a specific time.

     

    I was thinking that I could add the creation of a one-record dataset as the last step in the JCL to trigger an ESP DSTRIG event.  I could then use the DELAYSUB as an APPL processing option to interrogate the day of the week that the event was triggered, and add the correct number of days to execute on Sunday -- it would have several IF statements to determine the DELAYSUB . 

     

    BTW, I was also looking into RELDELAY, but saw that it would only delay by number of minutes, so that won't work.

     

    Am I going into the right direction by using a DSTRIG and a DELAYSUB within the APPL?  Or is there an easier method that I'm not not aware of/seeing, like using the CALENDAR somehow?  I want to get my architecture down before I start fiddling around... I need some guidance from you gurus! 

     

    Thanks,

     

       MG



  • 2.  Re: Use Of Dataset Trigger And Delay Statement

    Posted Nov 14, 2017 05:37 PM

    Hi MG,

    Does the example below work for you? The first job could have the DELAYSUB statement. In this case it will build on whatever day it was triggered and wait for 03.00 SUNDAY

     

    JOB DPTST001
    RUN DAILY
    DELAYSUB 03.00 SUNDAY
    RELEASE TEST
    ENDJOB

     

    Let me know if I "Missed the boat"

    Don



  • 3.  Re: Use Of Dataset Trigger And Delay Statement

    Posted Nov 14, 2017 06:44 PM

    Ah, I see what you are saying. 

     

    The first job is not in the ESP world.  It would be a manually set up due to the number of files coming in and the job parameters, so there would be no APPL to RELEASE the load job on Sunday.  I'm trying to connect the manually submitted job (which can be requested at any time during the week) to trigger the web load on Sunday nite.

     

    My bad.  I can see where that is an important piece of information. 



  • 4.  Re: Use Of Dataset Trigger And Delay Statement
    Best Answer

    Posted Nov 15, 2017 08:22 AM

    Hi MG,

    These are the steps I was thinking....

    1) When the client runs the manual piece it updates a dataset XYZ. (Let's say it is Tuesday). 

    2) A data set trigger for XYZ fires on Tuesday and builds the appl with the WEBJOB  that I included below. 

    3) The web job waits until Sunday at 03.00 and runs. 

     

    JOB WEBJOB 
    RUN DAILY
    DELAYSUB 03.00 SUNDAY
    DUEOUT EXEC 04.00 SUNDAY 
    ENDJOB

     

    I am sure I may be missing the boat some where.  Give me a call if you would like to discuss this. 

    Don 

    214-473-1191



  • 5.  Re: Use Of Dataset Trigger And Delay Statement

    Posted Nov 15, 2017 01:02 PM

    I understand what you are doing... totally makes sense.  My design was way more complicated (using multiple IF statements with the DELAYSUB). 

     

    Thank you for your time on this... This "newbie" appreciates your feedback! 



  • 6.  Re: Use Of Dataset Trigger And Delay Statement

    Posted Nov 15, 2017 03:16 PM

    Hey, 

    Thanks for the update. I am sure it was my poor explanation that added to the confusion.  

     

    Let us know if you have questions along the way. 

     



  • 7.  Re: Use Of Dataset Trigger And Delay Statement

    Posted Nov 16, 2017 07:27 PM

    OK, Don, I've set it up and did a "simulate" on the job and it says it will executed 11 pm Sunday.  Everything looks good so far! 

     

    So, I submitted the first job which is the dataset trigger, and it completed successfully.  It should have gone through the proc and is sitting in some queue to be executed.  I checked the 'Scheduled Activity' and 'Application Monitor' pages, but I'm not seeing the job name scheduled for Sunday.  I'm sure it's out "there" somewhere, so I'll check it on Monday.  (I'll be OOO tomorrow, which is why I'm submitting today.)

     

    Wish me luck... and thanks again, Don! 



  • 8.  Re: Use Of Dataset Trigger And Delay Statement

    Posted Nov 20, 2017 03:07 PM

    Don,

     

    Thanks for your expertise!  It worked like a charm. 

     

    Unfortunately, I don't have the accesses to verify the job is in the system and ready for Sunday's execution, so that's another hurdle I need to tackle... I'm working on it!

     

    Thank you so much! 

     

        MG