INTERVAL statement
The following table describes the keywords and options for each keyword.
Keyword | Description | Value | Description of value |
---|---|---|---|
START (optional) | Specifies the beginning date and time for the data to be included You must specify this keyword 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, the start time defaults to the timestamp of the first record in the TRACEIN data set. If multiple Db2 subsystems that do not all share the same collection interval are reported, the start time for each Db2 can be different. The request is made with the start time 10:00 A.M. The interval for DB2A starting at midnight is active, so midnight is the start time for DB2A. The interval for DB2B starting at 8:00 A.M. is active, so 8:00 A.M. is the start time for DB2B. Valid abbreviation: S | date | Beginning date of the interval When specified without a time, the time defaults to midnight (12:00 A.M.) on the specified date (midnight = beginning of day). |
-nn | Number of days prior to the current date used for the beginning date Valid values include any number from -0 through -60. When specified without a time, the time defaults to midnight (12:00 A.M.) on the specified date (midnight = beginning of day). | ||
time | Beginning time for the data to be included 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 date defaults to the first date when that time occurs in the archive data set. | ||
date,time | When both a date and time are specified, the selected data begins 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 selected data begins with the first record with a timestamp that is equal to or greater than the calculated date and specified time. | ||
END (optional) | Specifies the ending date and time for the data to be included END and FOR are two different ways of specifying the ending time of reports. If both keywords are specified, END is ignored. If no END or FOR keyword is specified, the end time defaults to the timestamp of the last record in the TRACEIN data set. The END date and time must 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 product flags the date-time combination with a dollar sign ($) in the text of the control statements and the BMC24189 warning message is displayed, stating that the end time is later than the run time. Valid abbreviation: E | date | Ending date of the interval When specified without a time, the time defaults to midnight (12:00 A.M.) on the specified date (midnight = beginning of day). |
-nn | Number of days prior to the current date used for the ending date Valid values are any number in the range -0 through -60. When specified without a time, the time defaults to midnight (12:00 A.M.) on the specified date (midnight = beginning of day). | ||
time | Ending time for the data to be included 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 selected data ends with the last records in the archive data set 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 selected data ends with the last record having a timestamp equal to or less than the calculated date and specified time. | ||
FOR (optional) | Specifies the duration of the interval (as an alternative to specifying an END time) END and FOR are two different ways to specify the ending time. If both keywords are specified, END is ignored. If no END or FOR keyword is specified, the end time defaults to the timestamp of the last record in the data set. If neither a START nor an END or FOR is specified the entire contents of the TRACEIN data set are selected. Valid abbreviation: F | 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. 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 an interval of 30 days and 6 hours. This INTERVAL statement selects data generated on 02/22/2007 (USA format) between 6:00 a.m. and 12:00 noon. |