ADRULE - Rule

The ADRULE statement defines a run cycle rule.

Note: Individual keywords on ADRULE statements cannot be specified individually when using OPTIONS DBMODE(UPDATE), you must specify the entire rule. Set ONLY or EVERY as the first keyword.
Table 1. Keywords for ADRULE
Keyword Description
EVERY

ONLY

Specifies the number (for ONLY) of the day or days to be selected. For EVERY, this specifies the interval of the series. The number is in the range 1 to 999.

Use EVERY to specify a series of days. For example, EVERY(2) DAY(DAY) FEBRUARY specifies days 1, 3, 5, 7 etc. in February. The origin of the series is 1 unless you also specify ORIGINSHIFT.

Use ONLY to specify the days precisely. For example, ONLY(2) DAY(DAY) FEBRUARY specifies only February 2.

LAST Specifies the number (for ONLY) of the day or days to be selected. For LAST(3), read “third last,” so ONLY LAST(3) DAY(DAY) JANUARY specifies JANUARY 29.

For EVERY, this specifies the interval of the series, starting from the end, so EVERY LAST(3) DAY(DAY) JANUARY specifies January 31, 28, 25 etc. The origin of the series is the last day unless you also specify ORIGINSHIFT. The number is in the range 1 to 999.

DAY Specifies the day or days. You can abbreviate the names of the days to MON TUE WED THU FRI SAT SUN WORK and FREE.
WEEK Specifies the week number or numbers. The number might range from 1 to 53. Week 1 is defined as the first week with at least 4 days of the new year. If you omit the number, the rule selects every week.
MONTH Specifies the month or months. If you omit the name of the month, the rule selects every month.
Note: You can abbreviate the names of the months to the first three characters.
  • JANUARY
  • FEBRUARY
  • MARCH
  • APRIL
  • MAY
  • JUNE
  • JULY
  • AUGUST
  • SEPTEMBER
  • OCTOBER
  • NOVEMBER
  • DECEMBER
YEAR Used to specify that the cycle is a year, as in EVERY(2) DAY(DAY) YEAR, which gives January 1, January 3, January 5 etc. for each year. ONLY LAST DAY(FRIDAY) YEAR gives the last Friday in each year.
PERIOD The name of a user-defined period, which must be in the period database. If you specify a period name such as JULY, which is the same name as a predefined cycle, HCL Workload Automation for Z looks for a user-defined period JULY, and gives an error if one does not exist.
ORIGINSHIFT Specifies the origin shift in days. The number is in the range 1 to 999. Use this only with the EVERY keyword, when the origin is not the first (or, with LAST, the last) day of the cycle or period. If you specify EVERY(4) DAY(DAY) MONTH ORIGINSHIFT(1), for example, the rule selects a series starting at the second day of each month, with an interval of 4 days: January 2, 6, 10 etc., then February 2, 6, 10 etc., for each month in the year.