Default language.

Space announcement The Using section of the MainView for DB2 documentation is now available in Japanese. The displayed language is dependent on your browser language. You can switch languages from the Language menu.

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.

GUID-505B93B4-609D-4725-AE2E-513F9ECCF40D-low.png

Note

The BSTATDR report is designed to report on delta values between the start and end times of the requested interval. If DB2 is recycled during the interval, the statistics values are reset and the delta calculations are impacted, which can result in low or even negative values in the report. To avoid such values, divide the interval into two separate reports that do not span the time that DB2 was down.

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.

Example

There are two DB2s being reported:

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

The report is activated at 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

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:

  • Data Collector—The date defaults to the current date if the specified time has already passed on the current date. If the specified time is later than the current time, the date defaults to the previous day.
  • Data set—The date defaults to the first date upon which that time occurs in the source data set. For example, if a time of 8:00:00 is specified and the timestamp of the first record in the data set is 01/01/2011 10:00:00 (USA format), the date defaults to 01/02/2011.

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.

Note

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, 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.

Example

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

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).

Note

END and FOR are two different ways to specify the ending time of reports. If both keywords are specified, END is ignored.

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.

Example

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

This INTERVAL statement sets a global default interval for all reports, which includes data generated on 02/22/2011 (USA format) between 6:00 a.m. and 12:00 noon.

Reporting begins with the first record (in the archived data set when data set is the source; in the active data set when a Data Collector is the source) with a timestamp equal to or having an interval that includes the start time and ends with the last record with a timestamp equal to or less than the end date and time. If the data source is a Data Collector and the end time falls within the current interval at report activation, no data from that interval is reported.

This INTERVAL statement applies to all subsequent REPORT statements in the same job stream unless they contain an INTERVAL parameter or until another INTERVAL statement is encountered.


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.

Example

INTERVAL(START(02/14/2006,6:00:00) - BY(6:00:00))

This INTERVAL statement sets a global default interval for all reports that include data generated on 02/14/2006 (USA format) between 6:00 A.M. and 12:00 noon.

This INTERVAL statement applies to all subsequent REPORT statements in the same job stream unless they contain an INTERVAL parameter, or until another INTERVAL statement is encountered. If BY is not specified, the period defaults to the entire interval duration.



 

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