Data Privacy functions

Data Privacy functions provide various methods to transform or mask sensitive data. They require an Optim Data Privacy License.

LOOKUP function

The LOOKUP function obtains the value for a destination column from a DB2 table, the lookup table, according to the value in the source column. Use the LOOKUP function to translate a source value to a corresponding look-up value, which is placed in the destination.

There are two forms of the LOOKUP function, single column and multiple column. The single column form inserts a value into a single destination column. The multiple column form inserts values from multiple lookup table columns into corresponding destination columns, which are based on a single source column value. You can use the LOOKUP function alone or in combination with other Column Map functions to achieve the appropriate data masking results.

You can enter the multiple column LOOKUP function for any source column that will be replaced by a lookup table value, but you must edit the Column Map to remove the names of remaining source columns that also will be replaced.

Use the IGNORE parameter to ignore the lookup table and use a source value when a row in a specified source column contains a specified value [NULL, SPACES (for CHAR columns), or zero-length VARCHAR].

Use the PRESERVE parameter to ignore the lookup table and use a source value when a source column contains a specified value [NULL, SPACES (for CHAR columns), or zero-length VARCHAR]. If the lookup table does not contain a value for a source column, PRESERVE=NOT_FOUND inserts the source column value at the destination.

The LOOKUP function uses the following syntax:

LOOKUP( [sourcecol,...] [dest=(col1,coln,...),]
        lktablename(search,{value|values=(col1,coln,...) } )
        [cache|nocache]
        [ignore=(colname(spaces,null,zero_len),...]
        [PRESERVE=([NOT_FOUND]|colname(spaces,null,zero_len),...)])
sourcecol
Name of the source table column that contains the search value (optional). If not specified, the name of the destination column is used.
Note: The source column must be compatible with the search column.
dest=
Names of the destination table columns in which values from the lookup table are inserted. Required for multiple column lookup.
col1, coln, ...
Destination table column names. The order of the column names must correspond to the lookup table columns in the source= parameter.
lktablename
Name of the lookup table. You can specify the DB2 table name as creatorid.tablename or tablename. If you do not fully qualify the table name, the qualifiers for the destination table are used.
search
Name of the column in the lookup table that contains a value to match against the search value from the source column.
value
Name of the column in the lookup table that contains the translated search value to be inserted at the destination. Required for single column lookup.
Note: The value column must be compatible with the destination column.
values=
Names of the columns in the lookup table that contain values to be inserted at the destination. Required for multiple column lookup.
col1, coln, ...
Lookup table column names. The order of the column names must correspond to the destination table columns in the dest= parameter.
cache | no_cache
Specify CACHE (default) to maintain a table of found lookup values in memory or NO_CACHE to discard found values. Using CACHE is faster when you are retrieving a value many times, but requires extra memory.
ignore=
List of source columns with values that are inserted at the destination instead of the lookup value when the column has a row with a stated value (NULL, SPACES, or zero-length VARCHAR).
col
The source column name. For single column lookup, enter one column name only. For multiple column lookup, the order of the column names must correspond to the destination table columns in the dest= parameter. The number of columns must equal the columns in the dest= parameter, and at least one column must include values. To not specify values for a column, do not enter a value. For example, coln().
null
Ignore the lookup table if the source column row has a NULL value.
spaces
Ignore the lookup table if the source column row has a SPACES value. For CHAR columns only.
zero_len
Ignore the lookup table if the source column row has a zero-length VARCHAR value.
PRESERVE=
List of source column values (NULL, SPACES, or zero-length VARCHAR) to insert at the destination instead of the lookup value. Use PRESERVE=NOT_FOUND to insert the source column value at the destination if the lookup table does not contain a value.
NOT_FOUND
Insert the source column value at the destination, if no match is found in the lookup table.
colname
A column for which specified source values are inserted at the destination. The source values are as follows:
  • null
  • spaces
  • zero-length varchar
Note: Preserve= and ignore= are mutually exclusive. Ignore= will be deprecated in a future release. The col, null, spaces, and zero-length varchar operands have the same effect when used with either preserve= or ignore=.

Single Column Example

Use the LOOKUP function to translate the source value in a lookup table to a corresponding value in another table.

For example, assume the source column, STATE, contains state abbreviations (such as NJ) and the destination column is to contain the complete state name (in this example, New Jersey). A lookup table that is named STATE_LOOKUP contains a column (CODE) for state abbreviations or codes and a column (NAME) for the corresponding names.

To obtain the value for the destination column by using the STATE_LOOKUP table, specify:

LOOKUP(STATE,STATE_LOOKUP(CODE,NAME))

The LOOKUP function searches for a value in the CODE column of the STATE_LOOKUP table that matches the value (NJ) in the source table STATE column. When a match is found, the function inserts the corresponding value from the NAME column (New Jersey) in the destination column.

Multiple Column Example

Use the LOOKUP function to insert values from columns in a lookup table row into columns in a destination table row, which is based on a value in a source column.

Here is an example. Based on a source column (SOC_SEC) that contains social security numbers, you can replace values in destination columns (FIRST_NAME and LAST_NAME) with first and last names from a lookup table. A table that is named NAME_LOOKUP contains a column (SSN) with the social security numbers from the source table. That table also contains columns (FIRST_MASK and LAST_MASK) to mask corresponding names in the destination.

To replace names in the destination table that are based on a social security number, specify:

LOOKUP(SOC_SEC,DEST=(FIRST_NAME,LAST_NAME),NAME_LOOKUP(SSN,VALUES=(FIRST_MASK, LAST_MASK)))

The LOOKUP function searches for a value in the SSN column of the NAME_LOOKUP table that matches the value in the source table SOC_SEC column. When a match is found, the function inserts the corresponding values from the lookup table FIRST_MASK and LAST_MASK columns into the corresponding destination columns.

Ignore Example

Use the following statement to extend the Single Column Example, where you want to use the source NULL and SPACES values instead of lookup table values:

LOOKUP(STATE,STATE_LOOKUP(CODE,NAME),IGNORE=(STATE(NULL,SPACES)))

No_Cache Example

Use the following statement to extend the Single Column Example, where you do not want to maintain a table of found lookup values in memory:

LOOKUP(STATE,STATE_LOOKUP(CODE,NAME),NO_CACHE)

Random LOOKUP function

The Random LOOKUP function selects a value at random from a specified lookup table to insert in a destination column. The function generates a random number between 1 and the limit or number of rows in the lookup table to use as a subscript into the table. The column value or values from the row that correspond to the subscript are inserted in the destination column.

The Random LOOKUP function is not supported for DECFLOAT data type.

There are two forms of the Random LOOKUP function, single column and multiple column. The single column form inserts a value into a single destination column. The multiple column form inserts values from multiple lookup table columns into corresponding destination columns.

You can enter the multiple column Random LOOKUP function for any source column that will be replaced by a lookup table value, but you must edit the Column Map to remove the names of remaining source columns that also will be replaced.

use the IGNORE parameter to ignore the lookup table and use a source value when a row in a specified source column contains a specified value [NULL, SPACES (for CHAR columns), or zero-length VARCHAR].

Use the PRESERVE parameter to ignore the lookup table and use a source value when a source column contains a specified value [NULL, SPACES (for CHAR columns), or zero-length VARCHAR]. If the lookup table does not contain a value for a source column, PRESERVE=NOT_FOUND inserts the source column value at the destination.

The Random LOOKUP function uses the following syntax:

RAND_LOOKUP(lktablename,{columnname | dest=(col1,coln,...),values=(col1,coln,...)}
            [limit] [ignore=(colname(spaces,null,zero_len),...)]
            [PRESERVE=([NOT_FOUND]|colname(spaces,null,zero_len),...)])
lktablename
Name of the lookup table. You can specify the lookup table name as creatorid.tablename or tablename. If the table name is not fully qualified, destination table qualifiers are used.
columnname
Name of the column in the lookup table that contains the values to be randomly selected for insertion at the destination. Required for single column lookup.
dest=
Names of the destination table columns in which values from the lookup table are inserted. Required for multiple column lookup.
col1, coln, ...
Destination table column names. The order of the column names must correspond to the lookup table columns in the values= parameter.
values=
Names of the columns in the lookup table that contain values to be inserted at the destination. Required for multiple column lookup.
col1, coln, ...
Lookup table column names. The order of the column names must correspond to the destination table columns in the dest= parameter.
limit
Optional limit on number of rows from the lookup table that is used to select column values. Specify an integer, up to a maximum value of 2,000,000,000. If no limit is specified, all rows are used.
Note: You must leave a space after a comma that precedes a numeric value if the DB2 setup specifies a comma as the decimal point value.

A table of column values is generated in memory. The size of this table might be limited by system resources.

ignore=
List of source columns with values that are inserted at the destination instead of the lookup value when the column has a row with a stated value (NULL, SPACES, or zero-length VARCHAR).
col
The source column name. For single column lookup, enter one column name only. For multiple column lookup, the order of the column names must correspond to the destination table columns in the dest= parameter. The number of columns must equal the columns in the dest= parameter, and at least one column must include values. To not specify values for a column, do not enter a value. For example, coln().
null
Ignore the lookup table if the source column row has a NULL value.
spaces
Ignore the lookup table if the source column row has a SPACES value. For CHAR columns only.
zero_len
Ignore the lookup table if the source column row has a zero-length VARCHAR value.
PRESERVE=
List of source column values (NULL, SPACES, or zero-length VARCHAR) to insert at the destination instead of the lookup value. Use PRESERVE=NOT_FOUND to insert the source column value at the destination if the lookup table does not contain a value.
NOT_FOUND
Insert the source column value at the destination, if no match is found in the lookup table.
colname
A column for which specified source values are inserted at the destination. The source values are as follows:
  • null
  • spaces
  • zero-length varchar
Note: Preserve= and ignore= are mutually exclusive. Ignore= will be deprecated in a future release. The col, null, spaces, and zero-length varchar operands have the same effect when used with either preserve= or ignore=.

Single Column Example

To select a value at random from the STATE column in the first 50 rows of a table that is named STATE_LOOKUP and insert it in the destination column, specify:

RAND_LOOKUP(STATE_LOOKUP,STATE,50)

Multiple Column Example

To select values from the CITY, STATE, and ZIP columns in a random row of a table that is named STATE_LOOKUP and insert them in the corresponding destination columns, specify:

RAND_LOOKUP(STATE_LOOKUP,DEST=(CITY,STATE,ZIP),VALUES=(CITY,STATE,ZIP))

Ignore Example

Use the following statement to extend the Single Column Example, where the source column is named STATES and you want to use the source NULL and SPACES values instead of lookup table values:

RAND_LOOKUP(STATE_LOOKUP,STATE,50,IGNORE=(STATES(NULL,SPACES)))

Hash Lookup function

The Hash LOOKUP function obtains the value for a destination column from a lookup table, according to a hashed value derived from a source column. Use the Hash LOOKUP function to consistently mask data when you use the same source and lookup tables in any environment. The source column that is hashed does not need to be a column that will be replaced by lookup table values.

There are two forms of the Hash LOOKUP function, single column and multiple column. The single column form inserts a value into a single destination column. The multiple column form inserts values from multiple lookup table columns into corresponding destination columns, based on a single hash value from a source column.

You can enter the multiple column Hash LOOKUP function for any source column that will be replaced by lookup table values, but you must edit the Column Map to remove the names of remaining source columns that also will be replaced.

The lookup table must include a key column that contains sequential number values without any gaps, and the remaining columns contain replacement values. The key column must be a numeric data type. The lookup table is typically indexed. The function hashes a source column to derive sequential numbers from 1 to the maximum value in the key column of the lookup table. The hashed value from the source table is matched with the sequential numbers in the lookup table, and values from the corresponding lookup table row are inserted at the destination.

The function assigns NULL, SPACES (for CHAR columns), and zero-length VARCHAR values to the numbers -1 (for NULL), -2 (for SPACES), and -3 (for zero-length VARCHAR). The lookup table should include a row for each of these numbers, which will allow you to insert a lookup value for each of these source values. If one of these source values is found and a corresponding number is not in the lookup table, a conversion error is reported.

Use the IGNORE parameter to ignore the lookup table and use a source value when a row in a specified source column contains a specified value [NULL, SPACES (for CHAR columns), or zero-length VARCHAR)].

Use the PRESERVE parameter to ignore the lookup table and use a source value when a source column contains a specified value [NULL, SPACES (for CHAR columns), or zero-length VARCHAR]. If the lookup table does not contain a value for a source column, PRESERVE=NOT_FOUND inserts the source column value at the destination.

You can use the TRIM parameter to specify characters that will be trimmed from the source value before it is hashed. For example, to trim commas from a source value, the values Smith, John, and Smith John will each be hashed to the same value. You can also use this parameter to convert the source value to uppercase before it is hashed. If the source value is converted to uppercase, the trim characters are also converted to uppercase.
Note: Before Optim 11.3, the HASH_LOOKUP function automatically trimmed trailing blanks from columns of fixed-length CHARACTER and GRAPHIC data when the length of the column exceeded 14 characters. Beginning in Optim 11.3, you must use the \r parameter to trim trailing blanks.

You can use the SEED parameter to vary the calculation that is performed by the hashing algorithm. The hashed value from the source column and the SEED value are matched with a sequential number from the lookup table to obtain the replacement value for the destination column.

Here is the syntax:

HASH_LOOKUP( [sourcecol,...]
             [trim=([char1char2...][\u][\r])]
             [dest=(col1,coln )]
             lktablename(search,{value |values=(col1,coln,...)})
             [cache|nocache]
             [ignore=(colname(spaces,null,zero_len),...)] |
             [PRESERVE=([NOT_FOUND]|colname(spaces,null,zero_len),...)]
             [seed=n]) 
sourcecol
Name of the source table column from which hashed values are derived (optional). If not specified, the name of the destination column is used.
dest=
Names of the destination table columns in which values from the lookup table are inserted. Required for multiple column lookup.
col1, coln, ...
Destination table column names. The order of the column names must correspond to the lookup table columns in the values= parameter.
trim=
List of characters that are trimmed from the source value before it is hashed. For Single-Byte (SBCS) characters, you can also use trim to convert the source value to uppercase before it is hashed.
char1char2. . .
Characters that are trimmed from the source value before it is hashed. For example, if you are trimming commas from the source, the values Smith, John, and Smith John hash to the same value. The list is case sensitive. You can specify a space or comma as a character. After the initial occurrence of a character, any additional occurrences in the list are ignored. If the value is NULL or all spaces after characters are trimmed, the source value is not hashed and is assigned the appropriate reserved value (-1 or -2).

To specify a backslash, \, or a right parentheses, ), you must precede the character with a backslash escape character. For example, to specify a right parenthesis, enter: trim=(\)). You can use the escape character only with a backslash, a right parenthesis, the uppercase indicator, or as part of the indicator to remove trailing blanks (\r).

Note: Restriction on using backslash escape character and Japanese character sets:Some Japanese character sets use a code page with a hexadecimal value for the backslash escape character that is different from the hexadecimal value required by Optim. Optim requires hexadecimal value E0 for the backslash escape character. If you are using a code page that represents the backslash escape character with a hexadecimal value other than E0, use the ISPF editor command HEX ON and modify the value to E0 for it to be processed correctly.
\u
Converts the source value to uppercase before it is hashed. Any trimmed characters are also converted to uppercase. Upper and lowercase letters hash differently. For example, John and JOHN hash to different values. If you want upper and lowercase values to hash to the same value, use trim=(\u) to convert the source value to uppercase before it is hashed.
\r
Trims all trailing blanks from the source value before it is hashed. This parameter is not supported for VARCHAR and VARGRAPHIC characters.

lktablename
Name of the lookup table. You can specify the lookup table name as creatorid.tablename or tablename. If you do not fully qualify the table name, the qualifiers for the destination table are used.
search
Name of the column in the lookup table that contains sequential values to match against the hash values from the source column.
value
Name of the column in the lookup table that contains the translated search value to be inserted at the destination. Required for single column lookup.
values=
Names of the columns in the lookup table that contain values to be inserted at the destination. Required for multiple column lookup.
col1, coln, ...
Lookup table column names. The order of the column names must correspond to the destination table columns in the dest= parameter.
cache | no_cache
Specify CACHE to maintain a table of found lookup values in memory or NOCACHE to discard found values. Using CACHE is faster when you are retrieving a value many times, but requires extra memory.
ignore=
List of source columns with values that are inserted at the destination instead of the lookup value when the column has a row with a stated value (NULL, SPACES, or zero-length VARCHAR).
col
The source column name. For single column lookup, enter one column name only. For multiple column lookup, the order of the column names must correspond to the destination table columns in the dest= parameter. The number of columns must equal the columns in the dest= parameter, and at least one column must include values. To not specify values for a column, do not enter a value. For example, coln().
null
Ignore the lookup table if the source column row has a NULL value.
spaces
Ignore the lookup table if the source column row has a SPACES value. For CHAR columns only.
zero_len
Ignore the lookup table if the source column row has a zero-length VARCHAR value.
PRESERVE=
List of source column values (NULL, SPACES, or zero-length VARCHAR) to insert at the destination instead of the lookup value. Use PRESERVE=NOT_FOUND to insert the source column value at the destination if the lookup table does not contain a value.
NOT_FOUND
Insert the source column value at the destination, if no match is found in the lookup table.
colname
A column for which specified source values are inserted at the destination. The source values are as follows:
  • null
  • spaces
  • zero-length varchar
Note: Preserve= and ignore= are mutually exclusive. Ignore= will be deprecated in a future release. The col, null, spaces, and zero-length varchar operands have the same effect when used with either preserve= or ignore=.
seed=
Use seed= to vary the hashing algorithm calculation. Specify 1 - 2,000,000,000. If you use a value of 0, the seed parameter is ignored.

Single Column example

Use the Hash LOOKUP function to insert values from a column in a lookup table into a destination table column, based on a value that is hashed from a source column.

For example, assume the source column, FIRST_NAME, contains first names and the destination column includes replacement first names from the lookup table. A lookup table, NAME_LOOKUP, contains a column (FIRST) with first names and a column (SEQ) containing sequential values.

To obtain values for the destination column by using the NAME_LOOKUP table, specify:

HASH_LOOKUP(FIRST_NAME,NAME_LOOKUP(SEQ,FIRST))

The Hash LOOKUP function matches the hash values from the source column with values in the SEQ column of the NAME_LOOKUP table. When a match is found, the function inserts the corresponding value from the FIRST column into the destination column.

Multiple Column example

Use the Hash LOOKUP function to insert values from columns in a lookup table row into columns in a destination table row, based on a value that is hashed from a source column.

Here is an example. Based on values that are hashed from a source column (FIRST_NAME) that contains first names, you can replace values in destination columns (FIRST and LAST) with first and last names from a lookup table. A lookup table that is named NAME_LOOKUP contains a column (SEQ) with sequential values. That table also contains columns (FIRST_MASK and LAST_MASK) to mask values in the destination.

To replace names in the destination table based on a value hashed from a source column, specify:

HASH_LOOKUP(FIRST_NAME,DEST=(FIRST,LAST),NAME_LOOKUP(SEQ,VALUES=(FIRST_MASK,LAST_MASK)))

The Hash LOOKUP function matches the hash values from the source FIRST_NAME column with values in the SEQ column of the NAME_LOOKUP table. When a match is found, the function inserts the corresponding values from the lookup table FIRST_MASK and LAST_MASK columns into the corresponding destination columns.

Ignore example

Use the following statement to extend the Single Column Example, where you want to use the source NULL and SPACES values instead of lookup table values:

HASH_LOOKUP(FIRST_NAME,NAME_LOOKUP(SEQ,FIRST),IGNORE=(FIRST_NAME(NULL,SPACES)))

No_Cache example

Use the following statement to extend the Single Column Example, where you do not want to maintain a table of found lookup values in memory:

HASH_LOOKUP(FIRST_NAME,NAME_LOOKUP(SEQ,FIRST),NO_CACHE)

Trim example

Use the following statement to trim spaces and commas from the source value and convert the source value to uppercase before it is hashed:

HASH_LOOKUP(FIRST_NAME,TRIM=( ,\u),NAME_LOOKUP(SEQ,FIRST))
This statement trims spaces from the source value before hashing:

HASH_LOOKUP(FULL_NAME,TRIM=( ),NAME_LOOKUP(SEQ,FULLNAME))

Move Age function

The Move AGE function:

  • Processes character, numeric, DATE, or TIMESTAMP columns.
  • Is not supported for LOB, XML, BINARY, or DECFLOAT columns.
  • Ages to an explicit date or by explicit or relative values.
  • Increments or decrements by days, weeks, months, years, or a combination of these units. Also, you can specify aging by a number of business units (such as payday, quarters, and so on).
  • Includes parameters to automatically adjust aged data to comply with business rules.
When the Column Map is used in an Insert, Load, or Convert Process, you can specify
  • Default values for source columns defined with AGE for which you have not provided all required values. For example, you can use one Column Map for multiple processes and specify unique aging amounts or business rules for each process without modifying the AGE function parameters on the Column Map.
  • Aging values for all DATE and TIMESTAMP columns not explicitly defined.
  • Whether aging is performed for an individual process.

AGE

AGE increments dates based on various parameters. To specify parameters to age dates before inserting them at the destination, use the AGE line command. This command invokes the Aging Specifications panel, which allows you to provide values to generate the AGE function and its parameters. Assume that AGE was specified for the ORDER_SHIP_DATE column. Some Aging Specifications values for the column are included in the following figure.

Figure: Aging Specifications

.--------------------- Aging Specifications --------------------.
|  Command  ===>                                                |
|                                                               |
|  Source Column       ===> ORDER_SHIP_DATE                >    |
|  Destination Column     : ORDER_SHIP_DATE                >    |
|                                                               |
|  Input Date Format   ===>                                     |
|  Output Date Format  ===>                                     |
|  Aging Rule          ===>                                     |
|  Rule Table          ===>                                     |
|  Pivot Year          ===>             (00 – 99)               |
|                                                               |
| Specify Explicit Date or Aging Amount                         |
|  Explicit Date       ===>             YYYY/MM/DD              |
|                                                               |
|  Aging Amount                                                 |
|   Years              ===>             (-2500  to +1581)       |
|   Months             ===>             (-30000 to +30000)      |
|   Weeks              ===>             (-30000 to +30000)      |
|   Days               ===>             (-99999 to +99999)      |
|   Business Rules     ===>             (0 to 30000)            |
|                                                               |
|  Propagate Aging     ===>             (Y-Yes, N-No)           |
'---------------------------------------------------------------'

The Input Date Format defines a two-digit year, so the Pivot Year is included to determine the century. An Output Date Format is not specified in the figure, but you might specify a different format, such as MMDDYYYY, to adjust the input to a four-digit year output.

The other values, such as aging values and rules, are not specified. These values are to be supplied for each process when the Column Map is used.

Aging Specifications panel

The Aging Specifications panel includes the following items:

Source Column
The name of the source column to age.
Destination Column
The name of the destination column, which you cannot modify.
Input Date Format
The date format of the source data. You can specify a distributed date format or a format that is defined by the site. The format must be valid for the column length and type.
Use an asterisk to display a selection list of formats valid for the column. This value is required. For more information about specifying the date format, see Date Formats.
Output Date Format
Specify the date format for the aged data. You can be specify a distributed date format or a format that is defined by the site. The format length must match the input format length.

Use an asterisk to display a selection list of formats valid for the column. If not specified, the Input Data Format is used. For more information about specifying the date format, see Date Formats.

Aging Rule
The name of the default aging rule to use. An aging rule is required only when you are aging by business units or if a rule table is specified. If an aging rule is not specified, the aging rule that is specified for the process is used.
Use an asterisk to display a selection list of rules in the current rule table. Specify NONE to do linear aging. An aging rule is not applied. For more information, see the Customization Guide, Customize Aging Rules for additional information about aging rules.
Rule Table
The name of the rule table that contains the specified aging rule. If not specified, the default rule table is used.
Pivot Year
The year that is used to determine whether a two-digit year value is handled as occurring in the 20th century (1900) or the 21st century (2000). If the year is greater than or equal to the pivot year, 1900 is used. If not specified, the pivot year that is defined for the process is used.
Explicit Date
An explicit date to use. The specified aging rule is applied to this date. The date must be in the form YYYY/MM/DD or YYYY/DDD.

Aging Amount

Years
The number of years to increment or decrement the date as a value in the range -2500 to +1581.
Months
The number of months to increment or decrement the date as a value in the range -30000 to +30000.
Weeks
The number of weeks to increment or decrement the date as a value in the range -30000 to +30000.
Days
The number of days to increment or decrement the date as a value in the range -99999 to +99999.
Business Rules
The number of occurrences of a business rule to adjust the date as a value in the range 0 - 30000. If you specify a value for Business Rules, you must specify an Aging Rule.
For example, if NEXTPAYDAY is the Aging Rule, the value in Business Rules is used to adjust the date by the specified number of paydays. Therefore, a 4 in Business Rules adjusts the date to the fourth payday after the date in the column. (The date to be adjusted is not included in the calculation.)
You can specify either a value for Business Rules or values for calendar units (Years, Months, Weeks, or Days), but not both.
Propagate Aging
An option to propagate the resulting age value. If you choose to propagate the value, PROP is displayed in Data Type for the source column; otherwise, this prompt is not displayed. For information about propagation, see Propagating Primary and Foreign Key Values.

The combined values for Years, Months, Weeks, and Dayscannot result in an aging amount greater than 1581 years. If it does exceed that amount, an error results when the aging is attempted.

DATE and TIMESTAMP Columns

You can direct Move to age values in DATE and TIMESTAMP columns by using the global specifications for the processor. However, if you want to age specific DATE and TIMESTAMP columns exclusively, age these columns to unique values, or use an exit, specify the AGE function for the column. These DB2 defined data types must have the format DB2DATE.

DATE and TIMESTAMP columns that are defined as nullable are skipped if they contain NULL. These columns are not aged and are included in the reported count of skipped columns. These skipped columns are handled the same as other skipped values according to the process specifications.

Date Formats

Date formats specify the format of a date column. These are encoded internally as a list of possible data types in a single format table. New formats can be added easily to the table without requiring coding for each individual format.

Each date format is specified by its name. Specify these formats in the Input Date Format and Output Date Format prompts on the Aging Specifications panel. You can also display a selection list of values appropriate for the specific column data type by entering an asterisk in these prompts.

Valid names are determined by the data type of the column. Move can support a date format of MMDDYY as a character column and a decimal column, even though these are processed differently.

Date Components

The formats that are distributed with Move are formatted with the following characters to represent the date component.

CC
Two-digit century.
YY
Two-digit year without century.
YYY
Three-digit year relative to 1900.
YYYY (or) CCYY
Four-digit year.
MM
Two-digit month.
MMM
Three-character abbreviation for the month (such as Jan or JAN).
DD
Two-digit day.
DDD
Three-digit Julian day.
DDDDDD
Lilian date (that is, the number of days since Oct. 14, 1582, the date the Gregorian Calendar was adopted).
/
Slash in date.
-
Dash in date.
*
Any delimiter in date.
U
Unsigned decimal. The letter U precedes the format.

Date Format examples

Move supports a wide variety of internal date storage schemes. For instance, a YYMMDD date column might be stored in various ways:

  • CCYYMMDD
  • CCYY*MM*DD
  • CCYY/DDD
  • DDMMYY
  • DD*MM*YY
  • DD/YY/MM
  • DDMMMCCYY
  • DDD-YY
  • MMDDYY
  • MM*DD*YY
  • MM/DD
  • MMM*DD*CCYY
  • MMM-YYYY
  • YYDDD
  • YYMM
  • YY*DDD
  • YY*MM
  • YYMMDD
  • YY*MM*DD
  • YYYYDDMM

Character formats and numeric formats, as either packed decimal or binary columns, are allowed for any format without delimiters. The following are some examples of date formats.

AGE specifications complete

After you define values for the AGE function on the Aging Specifications panel, use END to return to the Column Map editor. The AGE function is identified by the string AGE(column) where column is the name of the source column to be aged. You can modify these values by using the AGE line command again to redisplay the Aging Specifications panel. However, you must use the CLR line command to remove the entire AGE function specification or the SRC line command to replace the AGE function with the source column.