RANGE parameter reference

The RANGE parameter is used by any Extended Function that requires both a begin and end timestamp.

There are three different formats that you can use to specify this parameter.

RANGE parameter format 1

RANGE parameter format 1 allows you to specify a single base timestamp.

This base timestamp is then used to compute the begin and end timestamps, based on the direction, amount, and scale values.

RANGE(timestamp, direction, amount, scale)

RANGE specification reference:

timestamp
This value specifies the base timestamp that is used to compute the begin and end timestamps.

The timestamp can be expressed in either compressed or punctuated format.

Timestamp format reference: Timestamp format reference.

direction
This value specifies how the amount value is applied (added, subtracted) to the base timestamp when computing the begin and end timestamps.

Acceptable values are: + (plus), - (minus), and +- (plus,minus).

amount
This value specifies the number of seconds, minutes, hours, or days associated with the specified scale unit.

This value is added to or subtracted from the base timestamp value to compute the begin and end timestamps.

scale
This value specifies the time unit that is used to compute the begin and end timestamps.

Acceptable values for scale are SECS, MINS, HRS, or DAYS.

The scale value determines how the amount value is interpreted when computing the begin and end timestamps (seconds, minutes, hours, or days).

The allowed values for amount depend on the scale unit that is specified:

  • SECS (1-59 seconds)
  • MINS (1-59 minutes)
  • HRS (1-23 hours)
  • DAYS (1-366 days)

RANGE format 1 examples:

HCHECK(MINBAT RANGE('21.322/14:03:45.738290',-,11,HRS)) 
HCHECK(MINBAT RANGE('21.322/08:10:56.878818',+,35,MINS))
HCHECK(MINBAT RANGE('21.322/09:10:56.878618',+-,3,DAYS))

The begin and end timestamps are computed as follows:

  • If direction is specified as + (plus), the base timestamp that is specified becomes the begin timestamp.

    The end timestamp is then computed by adding the amount value to the base timestamp value.

  • If direction is specified as - (minus), the base timestamp that is specified becomes the end timestamp.

    The begin timestamp is then computed by subtracting the amount value from the base timestamp value.

  • If direction is specified as +- (plus,minus), the begin timestamp is computed by subtracting the amount value from the base timestamp value.

    The end timestamp is computed by adding the amount value to the base timestamp value.

RANGE parameter format 2

RANGE parameter format 2 allows you to specify a begin timestamp.

The end timestamp is then computed based on the execution time.

RANGE(begin-timestamp)

Timestamp format reference: Timestamp format reference.

RANGE format 2 examples:

HCHECK(MINBAT RANGE('21.329/07:02:16.7'))
HCHECK(MINBAT RANGE('2021.043/08:30:00'))

RANGE parameter format 3

RANGE parameter format 3 allows you to specify both a begin and end timestamp.

RANGE(begin-timestamp,end-timestamp)

Timestamp format reference: Timestamp format reference.

RANGE format 3 examples:

HCHECK(MINBAT RANGE('21.329/07:02:16.7','21.330/07:02:16.8')) 
HCHECK(MINBAT RANGE('2021.043/08:30:00','2021.045/14:50:00'))