search cancel

ESP on the Mainframe - Schedule a JOB Monday to Friday (excluding national holidays)

book

Article ID: 202460

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

We have a requirement to schedule a job Mon-Fri ( excluding national holidays) at 10AM between 1st Sunday of October & 1st Sunday of April & at 11AM between 1st Sunday of April & 1st Sunday of October to cater to AEST day light saving changes. Further, this needs to be specified within the PROC itself since it isn't feasible to specify it at event level (in this particular instance)

 

Environment

Release : 12.0

Component : CA ESP WORKLOAD AUTOMATION

Resolution

You can use the DAYS_BETWEEN function.

For full details, see online documentation CA WORKLOAD AUTOMATION ESP EDITION 12.0, section Calendaring Functions.
URL:https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/using/use-procedures/calendaring-functions.html

Here is an example:

JOB TEST
RUN WORKDAY
/* following check if today is between the two specific Sundays*/
IF DAYS_BETWEEN('1ST SUNDAY OF APRIL','TODAY') > 0 -
AND DAYS_BETWEEN('TODAY','1ST SUNDAY OF OCTOBER') > 0 THEN -
DELAYSUB 11AM
ELSE DELAYSUB 10AM
ENDJOB

Note:
1. I presume that you define Mon-Fri as WORKDAYS on the calendar definition. It will show on "LISTCAL calendar_name" or specified on WORKDAYS in ESPPARM; if neither shows up, the default will be Mon-Fri.

2. Please check if you have PTF RO89426 (GA'd in year 2017) applied, if you have this PTF applied you can set AEST time zone to be automatically adjusted.
Here is an example that can be defined in ESPPARM:

Example: Define automatic time zone adjustment,
The following example shows a time zone with defined automatic adjustment.
The adjustment to DST will happen at 2:00 AM every last Sunday of March and it will shift back from DST at 3:00 AM every last Sunday of October. |
TIMEZONE 20 CET 1E DSTON(2:00 LAST SUNDAY OF MARCH) -
DSTOFF(3:00 LAST SUNDAY OF OCTOBER)