BOUNDARY subcommand option

The BOUNDARY subcommand option controls the alignment of the intervals.

Usage

The BOUNDARY subcommand option is used to control the alignment of the intervals used to summarize records in the reduction process.

Usage notes

  • Boundary is ignored for INTERVAL (0). The interval starts at the timestamp of the first record that satisfies FROM.
  • If you use the RESTORE and REDUCE subcommands in the same job stream, the INTERVAL and BOUNDARY options specified in REDUCE should match the INTERVAL and BOUNDARY options that were used to reduce the data being restored. If these values are different, the interval and boundary from the restored data is used.

Rules

  • The range is from 0 to 60, and indicates minutes past the hour.
  • A boundary of 0 specifies that intervals are aligned with the number of minutes in the FROM time.
  • A boundary of 60 specifies that intervals are aligned with hour boundaries.
  • If no boundary is specified, the default is the boundary specified in the GLOBAL command.
  • If no boundary is specified in global, the default is 60.

Notes on calculating intervals

The start time of the first interval processed by REDUCE is influenced by BOUNDARY, INTERVAL, and FROM.

OMEGAMON for Db2 PE attempts to reduce all data that falls between FROM and TO dates and times. The first interval processed starts at a time aligned with BOUNDARY, at or before the FROM time. If an interval cannot be aligned with the FROM time, the first properly aligned interval starting before the FROM time is used.

Although there is no restriction on the INTERVAL and BOUNDARY combination, your specification should comply with the following recommendations:
  • For intervals of less than 60 (excluding 0), there should be a whole number of intervals in an hour. Choose one of the following values:
    • 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, or 30.
  • For intervals of 60 or greater, there should be a whole number of intervals in a day. Choose one of the following values:
    • 60, 120, 180, 240, 360, 480, 720, or 1 440.
  • For intervals of one day (1 440) or greater, INTERVAL should be a multiple of 1 440.
  • Select your interval and boundary so that the first interval starts at the FROM time.

Example of interval calculation, aligning to the start of the hour

BOUNDARY(60) aligns the start time of intervals at the start of an hour, so the first interval starts at the FROM time (08:00). Subsequent intervals start every 30 minutes (08:30, 09:00, and 09:30 each day).

 
REDUCE
   FROM     (,08:00)
   TO       (,10:00)
   INTERVAL (30)
   BOUNDARY (60)
 

Example of interval calculation, covering a day

The following defaults are applied:
  • For FROM, all dates and a time of 00:00:00.00.
  • For TO, all dates and a time of 23:59:59.99.

BOUNDARY(60) aligns the start time of intervals at the start of an hour, so the first interval starts at the FROM time (00:00). Subsequent intervals cover 1 440 minutes or one day; an interval starts at 00:00 each day.

 
REDUCE
   INTERVAL (1440)
   BOUNDARY (60)
 

Example of interval calculation, starting every hour

BOUNDARY(60) aligns the start time of intervals at the start of an hour, so the first interval starts at the hour of the FROM time (08:00). Subsequent intervals start every hour (09:00, 10:00, and 11:00).

 
REDUCE
   FROM     (,08:30)
   TO       (,12:00)
   INTERVAL (60)
   BOUNDARY (60)
REPORT
   FROM     (,08:30)
   TO       (,12:00)