Space announcement This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

INTERVAL statement


The INTERVAL statement specifies the time interval that applies to the statistics that DMDBMERG gathers for the PADB.

Related topic

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.

Example

 Two Db2 subsystems are being reported:

  • DB2A has a collection interval of 24 hours, starting at midnight.
  • DB2B has a collection interval of 8 hours (intervals starting at midnight, 8:00 A.M. and 4:00 P.M.).


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.

Example

If -5 is specified on 03/06/2005 (USA format), the start date is 03/01/2005. Use -0 to indicate the current date.

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.

Example

If a time of 8:00:00 is specified and the timestamp of the first record in the data set is 01/01/2005 10:00:00 (USA format), the date defaults to 01/02/2005.

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.

Example

If -5 is specified on 03/06/2005 (USA format), the end date is 03/01/2005. Use -0 to indicate the current date.

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.

Example

If the start date and time are 01/01/2005 8:00:00 (USA format) and you specify an end time without a date, the default date is 01/01/2005 and the specified time must be later than 8:00:00.

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.

Example

 INTERVAL(START(02/22/2007,6:00:00) - FOR(6:00:00))


This INTERVAL statement selects data generated on 02/22/2007 (USA format) between 6:00 a.m. and 12:00 noon.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*