AGGREGATE DATE

Syntax:


AGGREGATE DATE,startdate,{stopdate},{starttime},{stoptime}

Where:

startdate = a start date parameter

stopdate = an optional stop date parameter

starttime = an optional start time parameter

stoptime = an optional stop time parameter

This control statement specifies how DRLCEXTR builds the start and stop date/times when building CSR+ records. This control statement is turned on by default. If you do not maintain this standard in a custom aggregation, you cannot create meaningful drilldown reports by date.

During the aggregation process, DRLCEXTR calculates the earliest start date/time and the latest stop date/time in all records with the same values in the fields used for aggregation. The resulting dates and times are used in the aggregated CSR+ record.

Note: DRLCEXTR does not aggregate records in which the earliest start date/time and latest start date/time occur on different days.

The parameters included in the AGGREGATE DATE statement determine the accuracy of the dates and times that appear in the CSR+ record. The following are the available parameters:

  • Dictionary field names
  • Specific values
  • Keywords

These parameters are discussed in the following sections.

Dictionary Field Names

Because the information in the CSR+ record is loaded into an ODBC-compliant database and is used to build invoices and reports, accurate start and stop date/times are a very important consideration. Using CIMSDTVS field names provides the most accurate start and stop date/time because the dates and times are taken directly from the input records

The dictionary field names for the startdate and stopdate parameters are added to the list of fields used to aggregate data. The start time and stop time fields are not used as aggregation points.

Example


AGGREGATE DATE,CIMSSDT,CIMSEDT,CIMSSTM,CIMSETM

This example shows the default AGGREGATE DATE control statement used when processing 79x records. This statement will produce the most accurate start and stop date/time range for all 79x records regardless of using step or interval records.

The parameter values specified are identifier field names in the Dictionary. Appendix B. Identifiers and resources contains a listing of identifiers defined in the dictionary. If you do not want to use the default date and time identifiers, the identifiers with descriptions of dates and times might be appropriate selections for the AGGREGATE DATE statement.

If processing speed is a concern, specific start and stop date/times or keyword parameters can be used instead of Dictionary field names.

Specific Values

The AGGREGATE DATE control statement provides a method to specify a specific date/time or date range into the CSR+ records. A date is provided in the startdate or stopdate parameter using the format YYYYMMDD. When specific dates are used in the AGGREGATE DATE statement, the start time and stop time are automatically set to 0 and 2359, respectively.

Dates can be used within the range of 19800101 to 20991231.

Example


AGGREGATE DATE,20070101,20070131,0,2359

The resulting CSR+ records will have start date of January 1, 2007 and a stop date of January 31, 2007. The start time will be set to 0 and the stop time will be set to 2359.

Keywords

A keyword date can be provided in the startdate parameter. Keywords automatically calculate specific dates for the startdate and stopdate. When a keyword is encountered, the start time will default to 0 and the stop time will default to 2359. The following keywords are supported.

Keyword Description
**CURDAY Sets date range based on run date and run date, less one day.
**CURWEK Sets date range based on run week (Sun-Sat).
**CURMON Sets date range based on run month.
**PREDAY Sets date range based on run date, less one day.
**PREWEK Sets date range based on previous week (Sun-Sat).
**PREMON Sets date range based on previous month.
**CURRENT Sets date range based on current period from the Calendar file.
**PREVIOUS Sets date range based on previous period from the Calendar file.

VERSION x

The VERSION control statement directs processing to use a non-default version of the Dictionary definitions. By default, a value of 01 is used. The VERSION control statement will override the default value and access to the Dictionary will use the alternate version number when building the record key.

x - Identifies the version number. Must be a value between 00 and 99.

Example


AGGREGATE DATE,**PREMON

If the current month is April 2007, then **PREMON equals 20070301 to 20070331.

Default Control Statements by Record Type

Each record type processed by DRLCEXTR has a predefined default AGGREGATE DATE control statement. The default statements are set up to take advantage of the information that is available in the input records.

The following table shows the default AGGREGATE DATE control statements:

Default AGGREGATE DATE control statement for 79x records
AGGREGATE DATE,CIMSSDT,CIMSEDT,CIMSSTM,CIMSETM