Creating periods

About this task

Periods can be cyclic or noncyclic. A cyclic period starts on a specific date and has a specified number of days. There are two kinds of cyclic periods; work-days-only cyclic periods where only work days are counted, and all-days cyclic periods where all the days are counted.

A noncyclic period such as a an academic semester, has a varying interval, so you must specify the origin date of each interval.

If you run work at fixed days of the week, month, or year, and take one of the standard HCL Workload Automation for Z actions when this day falls on a free day (holiday), you do not need to create your own periods. You can describe most cases with rules such as:
  • First Sunday in June
  • First work day in the week
  • Last Friday in the year
  • Last free day in the month
If you do need to create your own periods, either for use in rules or in the older (offset-based) type of run cycle definition, follow this procedure:
  1. Create periods using the PERIOD panel. From the main menu, select option 1.3, to display the MAINTAINING THE PERIODS menu.
  2. Select option 2 to display the LIST OF CALENDAR PERIODS panel:
    Figure 1. EQQTPERL - List of calendar periods
    EQQTPERL ----------------- LIST OF CALENDAR PERIODS -------  ROW 1 TO 5  OF 5
    Command ===>                                                  Scroll ===> CSR
    
    Enter the CREATE command above to create a new period or
    enter any of the row commands below:
    B - Browse, C - Copy, D - Delete, M - Modify
    
    Row Period   Description                    Origin   Cyc Per Last update
    cmd name                                    date     int typ user     date
    '   ADVENT   Before Christmas               03/11/30   0  N  XCHAS    03/01/30
    '   SEMESTER University term                03/01/06   0  N  XCHAS    03/01/02
    '   TAXYEAR  British tax year               03/04/03   0  N  XMAWS    03/01/30
    '   BACKUP   A cyclic interval of 4 days    03/01/01   4  W  XMAWS    03/01/30
    '   QUARTER  Three calendar months          03/01/01   0  N  XMAWS    03/01/30
    ******************************* BOTTOM OF DATA ********************************
  3. To create a new period, enter CREATE at the command prompt. The following panel is displayed:
    Figure 2. EQQTCRPL - Creating a calendar period
    EQQTCRPL ---------------- CREATING A CALENDAR PERIOD --------  ROW 1 TO 1 OF 1
    Command ===>                                                  Scroll ===> CSR
    
    Enter/change data below and in the rows,
    and/or enter any of the following row commands:
    I(nn) - Insert, R(nn),RR(nn) - Repeat,  D(nn),DD - Delete
    
    PERIOD NAME        ===> ________   Name of the period
    PERIOD TYPE        ===> _          A = cyclic based on all days, W = cyclic
                                       based on work days, N = non-cyclic
    DESCRIPTION        ===> ______________________________
                                       Descriptive text of the period
    INTERVAL           ===> 000        Number of days between cyclic run period.
    VARIABLE TABLE     ===> ________________ JCL variable table id
    
    Row     Interval  Interval
    cmd     origin    end
    ''    ________  ________
    ******************************* BOTTOM OF DATA ********************************
  4. Complete the fields in the CREATING A CALENDAR PERIOD panel:
    PERIOD NAME
    The period name can be up to 8 characters.
    PERIOD TYPE
    There are three types:
    A
    All-days cyclic. HCL Workload Automation for Z counts both work days and free days when calculating period dates.
    W
    Work-days-only cyclic. HCL Workload Automation for Z counts only work days when calculating period dates. However, it is still possible for an offset-based run cycle to select a free day. See Using work-days-only cyclic periods.
    N
    Noncyclic.
    For example, if the calendar you are using specifies that 25 December 2003 is a free day, as are every Saturday and Sunday, and you create a type W period with an origin of December 1 and a length of 10 days, cyclic intervals will begin on these dates:
    • 1 December, 2003
    • 15 December, 2003
    • 30 December, 2003
    • 13 January, 2004, and every 10 work days after that

    If you create a run cycle for an application that references this period with an offset of 1, the application will be scheduled on these dates. Because 25 December is a free day, it is not counted when HCL Workload Automation for Z calculates the run dates of the period.

    DESCRIPTION
    Type a description of the period.
    INTERVAL
    For cyclic periods, type the length of the period. For noncyclic periods, leave blank.
    VARIABLE TABLE
    If you use an offset-based run cycle, and do not specify an overriding table name on the run cycle, HCL Workload Automation for Z uses the JCL variable table that you specify here. If you use this period with a rule-based run cycle, HCL Workload Automation for Z ignores any table name specified here. See Job tailoring for a full description of job tailoring and variable substitution.

    You can override the variable table, specified here or on the run cycle, using the MODIFY CURRENT PLAN (MCP) panel, the LONG TERM PLAN panel, or by using HCL Workload Automation for Z statements in the job.

    Interval origin
    For cyclic periods, specify the date of the start of the first interval in the period. For noncyclic periods, specify the start of every interval for, say, the next year. Remember to update the period definition and add more interval dates each year: HCL Workload Automation for Z issues a warning message when you extend or modify the long-term plan if you have not created intervals beyond the end of the long-term plan.
    Interval end
    For cyclic periods, leave this blank. For noncyclic periods, specify the end of every interval; the intervals must not overlap. If you leave this blank for noncyclic periods, HCL Workload Automation for Z assumes that the interval ends the day before the next interval.

    When a run cycle specifies a negative offset in the period, or a rule includes the LAST specification, the interval end date is used to base the calculation. If interval end is not specified, HCL Workload Automation for Z assumes that the interval ends the day before the next interval begins. However, if you have only one interval origin specified and no interval end, a negative offset will be calculated from the day before the interval origin date.

    When interval end is specified and a run cycle rule, or period and offset definition, results in a date outside the interval, an occurrence will not be generated. For example, a noncyclic period MYJAN specifies the start and end dates of January in every year. If you create a rule that specifies the 5th Friday in MYJAN and there are not 5 Fridays, the occurrence will not be generated in February. Similarly, if you specify offset 25 excluding free days and there are not 25 work days in a January, the occurrence will not be generated sometime in early February.

Note:
  1. If the free day rule causes an occurrence to be moved beyond interval end, or prior to interval start, the long-term planning process issues a warning message. The occurrence will be scheduled by HCL Workload Automation for Z outside the specified interval.
  2. From earlier versions of HCL Workload Automation for Z, work-days-only cyclic periods are handled differently. If you have defined the interval origin on a free day for a work-days-only cyclic period, a run cycle using that period will not generate the same dates as it did in previous releases of HCL Workload Automation for Z. To obtain the run dates you are used to in the long-term plan, move the interval origin to the nearest work day before the old interval origin. See Using work-days-only cyclic periods for more information.
  3. If you use a rule-based run cycle with a user-defined noncyclic period and do not specify an explicit end date for the last interval defined, GENDAYS and LTP batch treat the last specified origin date as an end date. Therefore, no occurrences are generated on or after the last specified origin date.
  4. If a noncyclic period is defined with more than one interval, that is, with more than one starting date, then to specify offsets you can count days from the starting of each interval and generate dates for the occurrences in the long-term plan.

    If an explicit interval end date is defined for an interval and a specified offset is greater than the number of days in the interval, then the obtained date will not be considered and the message EQQ0527W will be issued.

    However, with open intervals, that is, with intervals which have no explicitly defined end date, offsets greater than the number of days between origin dates will be accepted and run dates might be generated outside the defined intervals.

    Thus, HCL Workload Automation for Z checks that the generated date is within the period interval only for intervals with explicitly defined end dates.

  5. There is a maximum age limit for origins in noncyclic periods used with rule-based run cycles. When a noncyclic user-defined period is used in a rule run cycle, origin dates more than four years prior to January 1st of the current year do not generate correct run dates. For example, if a period is defined with a single origin on Monday, December 31st 2007, run cycles using that period generate incorrect run days in GENDAYS displays and LTP batch after January 1st 2012.