A job normally runs TUE-SAT. If Monday is a Holiday, the job should not run on Tuesday. Does anyone know how to make this work?
Thanks!
Jean
Run a job Tue-Sat except when Monday a Holiday
- nicolas_mulot
- Nouveau
- Posts: 149
- Joined: 07 Jan 2010 12:00
Meanjean,
If you have a controlm mainframe available, you can find a solution based on the CTMBLCAL and CTMRCAL utilities.
CTMBLCAL combines 2 calendars with “plus”, “minus” and “AND” operators, to produced a resulting calendar.
CTMRCAL creates calendars based on the scheduling parameters of the jobs within a scheduling table. It is actually an extension of the forcasting ctmrpln utility, also available on distributed.
Following your example, you could create a calendar of “those Mondays which are not working days” by running a CTMBLCAL which would perform
MONDAY – WORKDAYS = OFFMOND.
You can now define a job which specifies:
DAYS ALL
CONFCAL NOCONFCAL SHIFT +1
This jobs is then orderable on all the days which follow a Monday which is not a working day (which usually are Tuesdays).
Running CTMRCAL against that job will produce a calendar of all Tuesdays following a Monday which is not a working day. Let’s call it AFTMDNW
You can now run a CTMBLCAL which performs TUETOSAT – AFTMDNW will give you the expected result.
Once this is done, you can export your mainframe calendars using exportdefcal, the reload them to distributed aftyer having sed-ed the xml file.
If you don’t have a CTM mainframe, there is no other solution than manually defining such calendars, or developing your own procedures to reach the same result, which I have done.
I still do not understand why these useful utilities have never been re-conducted from mainframe to distributed along the past 20 years.
Cheers
Nicolas_Mulot
If you have a controlm mainframe available, you can find a solution based on the CTMBLCAL and CTMRCAL utilities.
CTMBLCAL combines 2 calendars with “plus”, “minus” and “AND” operators, to produced a resulting calendar.
CTMRCAL creates calendars based on the scheduling parameters of the jobs within a scheduling table. It is actually an extension of the forcasting ctmrpln utility, also available on distributed.
Following your example, you could create a calendar of “those Mondays which are not working days” by running a CTMBLCAL which would perform
MONDAY – WORKDAYS = OFFMOND.
You can now define a job which specifies:
DAYS ALL
CONFCAL NOCONFCAL SHIFT +1
This jobs is then orderable on all the days which follow a Monday which is not a working day (which usually are Tuesdays).
Running CTMRCAL against that job will produce a calendar of all Tuesdays following a Monday which is not a working day. Let’s call it AFTMDNW
You can now run a CTMBLCAL which performs TUETOSAT – AFTMDNW will give you the expected result.
Once this is done, you can export your mainframe calendars using exportdefcal, the reload them to distributed aftyer having sed-ed the xml file.
If you don’t have a CTM mainframe, there is no other solution than manually defining such calendars, or developing your own procedures to reach the same result, which I have done.
I still do not understand why these useful utilities have never been re-conducted from mainframe to distributed along the past 20 years.
Cheers
Nicolas_Mulot
Run a job Tue-Sat except when Monday a Holiday
kaouit and nicolas, thanks for your very helpful responses!