TOD Weekdays - NOT on HOLIDAYS

book

Article ID: 198177

calendar_today

Updated On:

Products

CA OPS/MVS Event Management & Automation

Issue/Introduction

I have a request to start and stop an IMS instance Monday to Friday but not on HOLIDAYS. 
How would you recommend exempting a holiday list in the TOD rule?


Environment

Release : 13.5

Component : OPS/MVS

Resolution

There is no special treatment of holidays in CA OPS.

I suggest that you create a global variable containing the holidays and test if today is a holiday in the rule code.

For example:

holidays = '01/01 07/04 08/26'
today = substr(date(u),1,5)
if pos(today,holidays) > 0
then
do
say 'today is a holiday - TOD not executed'
return
end
else
do
say 'Taking actions'
end
return

I included above only 3 holiday dates Jan, 1st, Jul, 4th and today just to make the code "think" today is a holiday for testing purposes.

The TOD statement doesn't need to be changed, that is, the rule will trigger every day from Monday to Friday even if it is holiday but the actions won't be taken on holidays due to the logic above in the rule.