INTERVAL parameters
If you did not specify an interval, the product uses the default interval that is defined in the report.
If you specify an interval without values, the results depend on the data source:
- Data Collector—Output includes the snapshot of Db2 activity that was taken while the report was active.
- Data set—Output includes all of the intervals that are present in the data set.
The following figure shows the syntax of the INTERVAL statement and parameter:

If you are generating the Batch SQL Comparison Analysis report (SQMBDIFF), you can specify multiple intervals. The following figures display an example of the syntax using multiple intervals:

DAY2 (START(-2,12:00) FOR(02:00:00))
DAY3 (START(-3,12:00) FOR(02:00:00)))
In the previous example, the Batch SQL Comparison Analysis report (SQMBDIFF) generates performance data for each of the included statements. The report groups the data by interval label (in this example, DAYn). The maximum length of a label is 8 characters.
The following sections describe the keywords and the permissible options for each keyword:
START keyword
The START keyword (optional) specifies the beginning date and time for the data included in the reports. You must specify this keyword if you specify FOR or END. The START date and time must be prior to the date and time when 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 multiple Db2s that do not share the same interval are being reported, the start time for each Db2 can be different.
Valid abbreviation: S
START keyword values
Value | Description of value |
|---|---|
date | Beginning date of the interval1 |
-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. |
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. The report begins with the first record with 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
The END keyword (optional) specifies the ending date and time for the data to be included in reports.
If you do not specify the END or FOR keyword and the data source is a data set, the end time defaults to the timestamp of the last record in the data set. If you do not specify the END or FOR keyword 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. This message states that the end time is later than the run time.
Valid abbreviation: E
END keyword values
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. |
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 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
The FOR keyword (optional) specifies the duration of the interval (as an alternative to specifying an END time).
- When the data source is a data set:
- If you do not specify an END or FOR keyword, the end time defaults to the timestamp of the last record in the data set.
- If you do not specify any of the START, END, or FOR keywords, the product reports the entire contents of the data set.
- When the data source is a Data Collector:
- If you do not specify an END or FOR keyword, the end time defaults to the time of report deactivation.
- If you do not specify a START or an END, the product reports only the current interval at report activation or deactivation.
Valid abbreviation: F
FOR keyword values
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. |
Related topic