CA Workload Automation ESP Edition

Expand all | Collapse all

ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

Jump to Best Answer
  • 1.  ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-09-2016 12:07 PM

    This question is for CA Workload Automation ESP Edition on z/OS.

     

    This seems like it should be easy to specify, but we have been struggling with finding a clear and concise SCHEDULE statement.

     

    The Application has a requirement to run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

     

    We have not been able to formulate a correct schedule statement so we are currently using GENTIME.

     

    We were hoping to avoid using GENTIME or a Special CALENDAR.

     

    I am reaching out to the Scheduling Specialists to see if anyone can provide a simplified SCHEDULE statement.

     

    The next 5 runs would be:

    6/4/16

    7/2/16

    7/30/16

    9/3/16

    10/1/16

     

    Thanks in advance.



  • 2.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-09-2016 12:42 PM

    Rick,

     

    Could something like this work:

     

    IF TODAY('4TH-10TH DAY OF MONTH') THEN RUN SAT

     

    Jonathan



  • 3.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-09-2016 12:49 PM

    No, because that would not include 7/30.

    7/29 is the LAST WORKDAY OF THE MONTH for  July and 7/30 is the Saturday after that date.



  • 4.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-09-2016 02:22 PM

    Rick,

    This may not meet your needs.  It is a two parter.

     

    JOB ABC

        RUN LAST WORKDAY OF THE MONTH

        DELAYSUB 08.00 SATURDAY

    ENDJOB

     

    It will come in on the last Saturday of the Month and wait until Saturday at 08.00

    You can see the date and time if you do a simulate for the last Saturday of the month.

     

    Just a shot...



  • 5.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-09-2016 03:02 PM

    I guess I can't type today.  

     

    It will come in on the last WORKDAY of the Month and wait until Saturday at 08.00

    You can see the date and time if you do a simulate for the last WORKDAY of the month.

     



  • 6.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-09-2016 03:47 PM

    But it also needs to run on 7/2

    The SATURDAY (7/2) after the LAST WORKDAY of June (6/30)



  • 7.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.
    Best Answer

    Posted 05-09-2016 04:54 PM

    Rick,

    It will run on July 2nd. See my simulate output below.

     

    SIMULATION OF EVENT POWDO03.TEMPLATE AT 00.00.00 ON THURSDAY JUNE 30TH, 2016

     

    TIME RELATED DEPENDENCIES                   

    ABC       EARLYSUB(08.00.01 SAT  2 JUL 2016)

                                                 

    JOB TYPE-JOBNAME---HC-RELEASES              

    LINK     ABC        0 (NONE)   

     

                



  • 8.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-13-2016 12:19 PM

    I think this solves the issue, but I have a question on the Event Definition do I need to schedule it daily?

     

    Then ESP will select jobs when the meet the specified run criteria.

     

    If I do that then I loose the functionality of  E.5 (NEXT - Display next execution time of an Event).

     

    I omitted an additional requirement that there are multiple runs on the day in question but I changed your example by adding jobs with a Job Qualifier and changing the DELAYSUB time.

     

    Is there a way to modify the SCHEDULE statement so that I can use the E.5 functionality?

     

    JOB TESTJOB.0800                      

      RUN LAST WORKDAY OF THE MONTH            

      DELAYSUB 08.00 SATURDAY                  

    ENDJOB                                    

                                              

    JOB TESTJOB.0900                      

      RUN LAST WORKDAY OF THE MONTH            

      DELAYSUB 09.00 SATURDAY                  

    ENDJOB                                    

                                              

    JOB TESTJOB.1000                      

      RUN LAST WORKDAY OF THE MONTH            

      DELAYSUB 10.00 SATURDAY                  

    ENDJOB        

     

     

    Simulation Output

     

    SIMULATION OF EVENT SCHTESP.SCHEDTST AT 00.00.00 ON TUESDAY MAY 31ST, 2016   
    JOBS: TESTJOB.0800, TESTJOB.0900, TESTJOB.1000                               
    3 JOBS SELECTED FOR SUBMISSION                                               
                                                                                 
    TIME RELATED DEPENDENCIES                                                     
    TESTJOB.0800  EARLYSUB(08.00.01 SAT  4 JUN 2016)                             
    TESTJOB.0900  EARLYSUB(09.00.01 SAT  4 JUN 2016)                             
    TESTJOB.1000  EARLYSUB(10.00.01 SAT  4 JUN 2016)                             
                                                                                 
    SIMULATION OF EVENT SCHTESP.SCHEDTST AT 00.00.00 ON THURSDAY JUNE 30TH, 2016 
    JOBS: TESTJOB.0800, TESTJOB.0900, TESTJOB.1000                               
    3 JOBS SELECTED FOR SUBMISSION                                               
                                                                                 
    TIME RELATED DEPENDENCIES                                                     
    TESTJOB.0800  EARLYSUB(08.00.01 SAT  2 JUL 2016)                             
    TESTJOB.0900  EARLYSUB(09.00.01 SAT  2 JUL 2016)                             
    TESTJOB.1000  EARLYSUB(10.00.01 SAT  2 JUL 2016)  

    SIMULATION OF EVENT SCHTESP.SCHEDTST AT 00.00.00 ON WEDNESDAY AUGUST 31ST, 2016
    JOBS: TESTJOB.0800, TESTJOB.0900, TESTJOB.1000                               
    3 JOBS SELECTED FOR SUBMISSION                                               
                                                                                 
    TIME RELATED DEPENDENCIES                                                     
    TESTJOB.0800  EARLYSUB(08.00.01 SAT  3 SEP 2016)                             
    TESTJOB.0900  EARLYSUB(09.00.01 SAT  3 SEP 2016)                             
    TESTJOB.1000  EARLYSUB(10.00.01 SAT  3 SEP 2016)

    SIMULATION OF EVENT SCHTESP.SCHEDTST AT 00.00.00 ON FRIDAY SEPTEMBER 30TH, 2016
    JOBS: TESTJOB.0800, TESTJOB.0900, TESTJOB.1000                               
    3 JOBS SELECTED FOR SUBMISSION                                               
                                                                                 
    TIME RELATED DEPENDENCIES                                                     
    TESTJOB.0800  EARLYSUB(08.00.01 SAT  1 OCT 2016)                             
    TESTJOB.0900  EARLYSUB(09.00.01 SAT  1 OCT 2016)                             
    TESTJOB.1000  EARLYSUB(10.00.01 SAT  1 OCT 2016)                                                                                  



  • 9.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-13-2016 02:39 PM

    Rick,

    You could schedule the event on the LAST WORKDAY OF THE MONTH instead of daily. Then the E.5 functionality semi works. It is a little deceiving since it will make the job look like it is going to run on the last workday of the month even though it waits until the following Saturday.  



  • 10.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-13-2016 03:39 PM

    When I has SCHEDULE LAST WORK OF MONTH and did the E.5 I did not "read" the E.5 output correctly.  I was expecting to see the jobs selected.

     

    I updated event with SCHEDULE LAST WORK OF MONTH.

     

    Then use E.3 SCHEDULE TIME of LAST WORKDAY OF <Month> to check next few runs to get SELECTED Jobs.

     

    Thanks for the help.



  • 11.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-12-2016 02:41 PM

    Rick,

     

    Did Don's suggestion help?



  • 12.  Re: ESP Schedule Statement run on the first SATURDAY after the LAST WORKDAY OF THE MONTH.

    Posted 05-13-2016 03:39 PM

    Yes.