INTERVAL parameters
If you have no interval specified, the default interval that is defined in the report is used.
If you specify an interval with no values, the results differ depending on the data source:
- Data Collector—Output includes the snapshot of DB2 activity taken while the report was active.
- Data set—Output includes all intervals that are present in the data set.
The following figure shows the syntax of the INTERVAL statement and parameter.
The following tables describe the keywords and the permissible options for each keyword.
START keyword (optional)The START keyword specifies the beginning date and time for the data to be included in reports. This keyword must be specified if FOR or END is specified. The START date and time must be prior to the date and time that the job is run.
If no START keyword is specified, and the data source is a data set, the start time defaults to the timestamp of the first record in the data set.
If no START keyword is specified, and the data source is a Data Collector, the start time defaults to the date and time of report activation.
If there are multiple DB2s being reported that do not all share the same interval, the start time for each DB2 can be different.
Valid abbreviation: S
Value | Description of value |
---|---|
date | Beginning date of the interval 1 |
-nn | Number of days prior to the current date to be used for the beginning date for data in the reports -nn Valid values include any number from -0 through -60. For example, if -5 is specified on 03/06/2011 (USA format), the start date is 03/01/2011. Use -0 to indicate the current date. 1 |
time | Beginning time for the data to be included in the reports Valid values are any time in the range 00:00:00–23:59:59 or 00:00–23:59. When specified without a date, the default differs, depending on the data source:
|
date,time | When both a date and time are specified, the reports begin with the first record having a timestamp that is equal to or greater than the specified date and time. |
-nn,time | When both a number of days and a time are specified, the date that is represented by -nn is calculated, and the report begins with the first record having a timestamp that is equal to or greater than the calculated date and specified time. |
1 When specified without a time, the time defaults to midnight (12:00 A.M.) on the specified date (midnight = beginning of day).
END keyword (optional)The END keyword specifies the ending date and time for the data to be included in reports.
If no END or FOR keyword is specified, and the data source is a data set, the end time defaults to the timestamp of the last record in the data set. If no END or FOR keyword is specified, and the data source is a Data Collector, the end time defaults to the time of report deactivation.
The END date and time should be prior to the date and time that the job is run. If both the START and END dates and times are later than the date and time that the job is run, an error results, and no report is produced. If only the END time is later than the data and time that the job is run, the report is produced, but the date-time combination is flagged with a dollar sign ($) in the text of the control statements and the BMC24189 warning message is produced, stating that the end time is later than the run time.
Valid abbreviation: E
Value | Description of value |
---|---|
date | Ending date of the interval 1 |
-nn | Number of days prior to the current date to be used for the ending date for data in the reports Valid values are any number in the range -0 through -60. For example, if -5 is specified on 03/06/2011 (USA format), the end date is 03/01/2011. Use -0 to indicate the current date. 1 |
time | Ending time for the data to be included in the reports Valid values are any time in the range 00:00:00–23:59:59 or 00:00–23:59. When specified without a date, the end date defaults to the start date. For this reason, an end time without a date is valid only if the specified time is later in the day than the start time. |
date,time | When both a date and time are specified, the report ends with the last record (in the archived data set when a data set is the source; in the active data set when a Data Collector is the source) having a timestamp equal to or less than the specified date and time. |
-nn,time | When both a number of days and a time are specified, the date represented by -nn is calculated and the report ends with the last record having a timestamp equal to or less than the calculated date and specified time. |
1 When specified without a time, the time defaults to midnight (12:00 A.M.) on the specified date (midnight = beginning of day).
FOR keyword (optional)The FOR keyword specifies the duration of the interval (as an alternative to specifying an END time).
If no END or FOR keyword is specified and the data source is a data set, the end time defaults to the timestamp of the last record in the data set. If no END or FOR keyword is specified and the data source is a Data Collector, the end time defaults to the time of report deactivation.
If neither a START nor an END or FOR is specified and the data source is a data set, the entire contents of the data set are reported. If neither a START nor an END is specified and the data source is a Data Collector, only the current interval at report activation or deactivation is reported.
Valid abbreviation: F
Value | Description of value |
---|---|
nnn | Duration of the interval stated as a number of days Valid values are any number in the range 1–364. |
time | Duration of the interval stated hours, minutes, and seconds (hh:mm:ss). Valid values are any time in the range 00:00:00–23:59:59 or 00:00–23:59. |
nnn,time | Duration of the interval stated as a number of days and hours For example, a specification of 30,6:00 means that the interval is reported in periods of 30 days and 6 hours. |
BY keyword (optional)The BY keyword specifies the length of the periods into which the interval is to be divided for reporting.
The maximum value for periods is 32767.
If BY is specified without START, “boundaries” are calculated based on the length of the period. The interval is aligned to the closest boundary prior to either report activation (when a Data Collector is the data source) or to the timestamp of the first record (when a data set is the data source).
Valid abbreviation: B
Value | Description of value |
---|---|
nnn | Length of each period stated as a number of days Valid values are any number in the range 1–364. |
time | Length of each period stated in hours, minutes, and seconds (hh:mm:ss). Valid values are any time in the range 00:00:00–23:59:59 or 00:00–23:59. |
nnn,time | Length of each period stated as a number of days and hours For example, a specification of 2,12:00 means that the interval is reported in periods of 2.5 days. |
Related topic