Creating calendars and periods

This chapter shows how you create your installation calendar, create period definitions, and how these work together with run cycles to specify when work will run. Run cycles are described in detail in Creating run cycles, where you specify these as part of the application definition.

When you run work manually without HCL Workload Automation for Z, you submit jobs according to a calendar. Some jobs run every day, some run every working day, some run on a fixed date each month, and so on. There are jobs that run at the end of each tax year, which varies from country to country. If HCL Workload Automation for Z is to be able to automate this, you must specify when jobs are to run. To achieve this, HCL Workload Automation for Z has three important objects:
Calendars
The calendar specifies normal working days and public holidays. HCL Workload Automation for Z uses the calendar to determine when applications are scheduled, and to calculate dates for JCL tailoring.

You can specify the calendar when you create an application. If no calendar is specified for the application, HCL Workload Automation for Z uses the calendar in the CALENDAR keyword of the BATCHOPT initialization statement, for batch services such as extending the long-term plan, or the calendar specified under the OPTIONS panel (0.2 from the HCL Workload Automation for Z main menu), for online services such as testing a rule with GENDAYS. If no calendar is specified, a calendar with the name DEFAULT will be used. If the DEFAULT calendar does not exist, all days are considered work days. You might have several calendars, but always call your default calendar DEFAULT, and specify the same calendar name on BATCHOPT and in the panel.

A calendar is created only if it contains at least one work day.

Periods
Periods are either cyclic, such as a week or 28-day period, or noncyclic, such as an academic semester. Cyclic periods are defined by their origin date and their length, and noncyclic periods by the origin date of each interval. Noncyclic periods can optionally have an end date for each interval.
Run cycles
When you create an application, you specify when it should run using a run cycle, which has one of two forms:
  1. A rule with a format such as The SECOND TUESDAY of every MONTH, where the words in capitals are selected from lists of ordinal numbers, types of day, and common calendar intervals or period names, respectively.
  2. A combination of period and offset. For example, an offset of 1 in a weekly period specifies Monday. An offset of 10 in a monthly period specifies the tenth day of each month.

Run cycles generate either positive or negative occurrences in the long-term plan. A negative occurrence always cancels any matching positive occurrences. You can specify a negative occurrence only if the positive equivalent already exists. You use negative occurrences to identify the days when an application would normally be scheduled but is not required. For example, when you normally schedule the application every Friday but not if Friday is also the last day of the month.

The run cycle type identifies whether positive or negative occurrences will be generated. You can specify many run cycles, positive and negative, when you create an application. You can mix run cycles that use offsets and run cycles that use rules in the same application.

Run cycle groups
Run cycle groups are sets of several run cycles. They are defined in the HCL Workload Automation for Z as database objects and are independent of applications. This implies that the same run cycle group can be used by more than one application and that an application can use a mix of its own run cycles and of one or more run cycle groups. The advantages of using run cycle groups are multiple, as explained in Defining and managing run cycle groups.

The long-term planning process uses the calendar information, the period definitions, and the run cycle, to determine the days on which an application should be scheduled. The daily planning process does not use the calendar and period definitions—HCL Workload Automation for Z uses the input arrival date and time in the long-term plan when it extends the current plan to include a new application occurrence. This does not determine when the operations run, because this depends on other factors such as predecessor completion, resource availability, deadline time, and priority.