CYCLE
The CYCLE control statement assigns a name to a unique date-time range.
{BIWEEKLY|CYCLEnn|CYCLE99|DAILY|HOLIDAYS|
MONTHLY|WEEKENDS|WEEKLY|WORKWKLY}
[,(sdate[:stime],edate[:etime])1...,(sdate[:stime],edate[:etime])31]
The period of the CYCLE range must be within the range defined by the DATETIME control statement. The CYCLE control statement requires that it be preceded by a DATETIME control statement.
A CYCLE range can be activated as a general default range to all report requests in a job or to individual report requests. Data is included in a report for any time range specified in a CYCLE statement, if the interval time for the data falls within that time range.
The CYCLE control statement only defines a symbolic name of a subset (time slice) of the date-time range of the DATETIME statement. A PERIOD statement is used to activate a CYCLE range. It is the placement of the PERIOD statement that determines whether one or all report requests are affected by a single CYCLE range.
When the CYCLE, DATETIME, and PERIOD control statements are used in the same statement set, they must appear in the following order, or else a command error results:
- DATETIME
- CYCLE
- PERIOD
Parameters
The parameters for the CYCLE control statement are as follows:
cycle name | is the first positional parameter in the CYCLE statement and must be specified The cycle name can be any of the values specified in the following table. Permitted values for the cycle name parameter
| ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
(sdate[:stime],edate[:etime]) | Thesdate:stime andedate:etime values define a date-time range to be associated with the CYCLE name. Up to 31 cycle ranges can be defined to one CYCLE statement. The cycle range is defined by using the same format as that used in the DATETIME control statement (see DATETIME). None of the ranges that are defined in a single CYCLE statement can overlap with one another. All ranges must be a subset of the range specified in the DATETIME control statement. Some CYCLE name values are self-defining; therefore, specifying a date-time range is optional. These values are CYCLE99, DAILY, MONTHLY, WEEKENDS, WEEKLY, and WORKWKLY. Other CYCLE names are not self-defining; therefore, they require a date-time range. These values are BIWEEKLY, HOLIDAYS and CYCLE99. |
Examples
The following examples illustrate the use of the CYCLE control statement.
CYCLE DAILY
PERIOD CYCLE=DAILY
The reporting period is daily, within the DATETIME specified. That is, daily reports are generated for the 1st through the 31st days of 2010.
CYCLE WEEKLY,(09364,10006),(10006,10013)
(10013,10020),(10020,10027)
PERIOD CYCLE=WEEKLY
Data is collected weekly from day 364 of 2009 to day 6 of 2010; day 6 to day 13 of 2010; day 13 to day 20; and day 20 to day 27 (time default operates: 000000).
CYCLE MONTHLY,(10001,10032)
PERIOD CYCLE=MONTHLY
The collection period is the first month of 2010 (that is, the beginning of the 1st to the beginning of the 32nd day of 2010), using the time default of 000000. In this example, the end date-time of 10032:000000 is functionally the same as 10031:240000, as seen in the first example.
Related topic