The AGING keyword specifies that date values in the source
columns are to be aged. It provides the parameters to be used in the
aging process.
Note: You must specify a value for only one
aging method: Explicit, Incremental, or Target. For Incremental aging,
the combined values of Years, Months, Weeks, and Days cannot result
in a year value greater than 3999. If the value exceeds 3999, an error
occurs in processing.
The following AGING
keyword parameters must be contained in parentheses and separated
by spaces.
AGING( { EXP_DATE date |
< YEARS n | MONTHS n | WEEKS n | DAYS n > |
BUSINESS_UNITS n |
BASE_DATE date TARGET_DATE date }
[ DEF_RULE_TABLE tablename DEF_RULE_NAME rulename ]
[ PIVOT_YEAR nn ] [ PROCESS_DATE_COLUMNS { A | U } ]
[ REPORT_INVALID { YES | NO } ] [ REPORT_SKIPPED { YES | NO } ]
[ OUTPUT_INVALID { YES | NO } ] [ OUTPUT_SKIPPED { YES | NO } ] )
Explicit Parameter
- EXP_DATE
- Specify an explicit date for aging. The date must be in the form
YYYY/MM/DD or YYYY/DDD (a Julian date). The aging rule is applied
to this date.
Incremental Parameters
- YEARS
- Adjust the date by n number of years.
- +nnnnn | -nnnnn
- Increment or decrement the value in the column by the number of
years specified. Specify one to four digits in the following range:
-2500 to +1581. A plus sign or a minus sign preceding the value indicates
whether the date is to be incriminated or decremented. Increment is
the default.
- MONTHS
- Adjust the date by n number of months.
- +nnnnn | -nnnnn
- Increment or decrement the value in the column by the number of
months specified. Specify one to five digits in the following range,
-30000 to +30000. A plus sign or a minus sign preceding the value
indicates whether the date is to be incriminated or decremented. Increment
is the default.
- WEEKS
- Adjust the date by n number of weeks.
- +nnnnn | -nnnnn
- Increment or decrement the value in the column by the number of
weeks specified. Specify one to five digits in the following range,
-30000 to +30000. A plus sign or a minus sign preceding the value
indicates whether the date is to be incriminated or decremented. Increment
is the default.
- DAYS
- Adjust the date by n number of days.
- +nnnnn | -nnnnn
- Increment or decrement the value in the column by the number of
days specified. Specify one to five digits, in the following range
-99999 to +99999. A plus sign or a minus sign preceding the value
indicates whether the date is to be incriminated or decremented. Increment
is the default.
- BUSINESS_UNITS
- Specify the date adjustment by business rule units.
- nnnnn
- Adjust the value in the column by n number of occurrences
of the specified business rule unit. Specify one to five digits in
the range, 0 to 30000. (Incriminating and decrementing is controlled
by the rule.) For example, if the Aging rule is specified as NEXTPAYDAY,
the date is adjusted by the specified number of paydays. Therefore,
a 4 in BUSINESS_UNITS adjusts the date to the fourth payday after
the date value in the column.
Target Parameters
- BASE_DATE
- Specify an explicit date as the origination or starting date for
calculating the aging amount. If you omit BASE_DATE, the current date
is assumed.
- date
- Must be in the form YYYY/MM/DD or YYYY/DDD (a Julian date).
- TARGET_DATE
- Specify an explicit date as the target for calculating the aging
amount. The aging amount is determined by the difference between the
Base Date and the Target Date.
- date
- Must be in the form YYYY/MM/DD or YYYY/DDD (a Julian date).
Other Parameters
- DEF_RULE_TABLE
- The name of the aging rule table to be used. (The default is the
site default aging rule table.)
- DEF_RULE_NAME
- The default aging rule for any date column not explicitly assigned
an aging rule. This must be a value in the default aging rule table
or blank.
If DEF_RULE_NAME is blank, no aging rule is applied to
any aged data that is not explicitly assigned a rule. (For details
about aging rule tables, see Customize Aging Rules in the Customization
Guide.)
- PIVOT_YEAR
- The year used to determine the century to assign to two-digit
year values. For example, if the PIVOT_YEAR value is 65, all two-digit
years that are 65 or greater are assumed to be in the 20th century
(19xx) and all two-digit years that are less than 65 are assumed to
be in the 21st century (20xx). This information is necessary to properly
age the data.
Note: If the Column Map specifies a Pivot Year value
for an individual column, the PIVOT_YEAR value is ignored for that
column.
- nn
- Specify a two-digit value from 00 to 99.
- PROCESS_DATE_COLS
- The type of date columns to be aged. Specify:
- A
- Age all DATE and TIMESTAMP columns and the columns mapped to AGE.
- U
- Age only columns mapped to AGE.
If a Column Map is not defined
or the AGE function is not specified on the selected Column Map, date
values apply only to DATE and TIMESTAMP columns.
- REPORT_INVALID
- Indicate whether to list details of invalid dates encountered
during the process in the process report. Specify:
- YES
- Report invalid dates.
- NO
- Do not report invalid dates.
- REPORT_SKIPPED
- Indicate whether to list details of skipped dates encountered
during the process in the process report. (Dates are skipped when
the value is not a valid date but has special meaning to the application.
See Skipped Columns.) Specify:
- YES
- Report skipped dates.
- NO
- Do not report skipped dates.
- OUTPUT_INVALID
- Indicate whether rows with invalid dates are written to the destination
database. Specify:
- YES
- Write rows with invalid dates to the database.
- NO
- Do not write rows with invalid dates to the database.
- OUTPUT_SKIPPED
- Indicate whether the rows with skipped dates are written to the
database. (See Skipped Columns.) Specify:
- YES
- Write rows with skipped dates to the database.
- NO
- Do not write rows with skipped dates to the database.
Skipped Columns
Frequently,
values that are not valid dates are inserted into date columns to
indicate special handling or conditions. Rather than treat these non-date
values as invalid or errors, the process “skips” them. That is, when
a column contains such a value, the column is bypassed. Since there
is no error, processing continues with the next date column.
The user can indicate whether skipped values are noted
in the Aging Report and if rows with skipped dates are written to
the output file.
To determine whether a column
should be skipped, the process evaluates the column value.
- If the column contains all spaces,
hex zeros (low-values) or hex “FF” (high-values), it is skipped.
- If the column does not contain
only those values, the process parses the column based on the specified
date format or user exit, if specified, and then examines the values
for each unit of the format. Based on site-specific definitions, the
value may be skipped. Typical skipped dates include 0000/00/00 and
99992/31. Check with site management for a list of skipped values.
Examples
The
following statement ages a date value by one year:
AGING (YEARS 1)
The following statement ages a date
value to the explicit date of January 1, 2008:
AGING (EXP_DATE 2008/01/01)