User overrides for rule sets

You can create overrides by using user override options within domain rule sets.

Return code values

The overrides statements must be in your pattern action table. The statements enable the overrides in the Designer client.

You can use the following syntax:


OVERRIDE_D Lookup_Value @Table_Name Return_Code [ CLASS | VALUE ]
Argument Description
Lookup_Value The name of the user variable containing either a pattern or text reference to the active token set that is to be checked for any applicable user overrides by looking up to the Table_Name provided.
Table_Name The name of the user override table to use.
Return_Code The name of either a user variable or dictionary field in which to store the return code value.
[ CLASS | VALUE ] CLASS indicates that the Lookup_Value contains a pattern reference where each token is represented by its token class.

VALUE indicates that the Lookup_Value contains a text reference where each token is represented by its token value.

Value Description
0 (zero) (default value) No user overrides were executed because no match was found for the specified Lookup_Value on the specified Table_Name.
1 A user override was successfully executed with no errors.

An example of the user created override action:


OVERRIDE_D Text @USNAME.UTO Return VALUE
OVERRIDE_D Pattern @USNAME.UPO Return CLASS

The specified Lookup_Value is searched for on the specified Table_Name. If the Lookup_Value is found, the active token set is written to dictionary fields by using the override instructions found in the matching table entry and then RETYPEd to null. Any existing content of the dictionary field is preserved while running the override instructions. A return code value is always returned and stored in the specified Return_Code.

The Lookup_Value can contain either a pattern or a string of literal token values, which represents the entire active token set.

The Table_Name is a two-column STAN conversion table that uses the following formats:

  • Pattern Override Table Format (for rule sets)

    Column 1: <[Classification for Token #1][Classification for Token #2]...>

    Column 2: <[DCT Field for Token #1][Data Flag for Token #1] - [DCT Field for Token #2][Data Flag for Token #2] -...>

    For example (for rule sets):

    
    FIF   FirstName1-MiddleName1-PrimaryName1
    ^D+T   HouseNumber1
    -StreetPrefixDirectional2-StreetName1-StreetSuffixType2
    +++   ExceptionData5
    
  • Text Override Table Format (for rule sets)

    Column 1: <["][Token #1][space][Token #2][space]...["]>

    Column 2: <[DCT Field for Token #1][Data Flag for Token #1] [DCT Field for Token #2] [Data Flag for Token #2]...>

    Text Overrides Examples (for rule sets)

    
    "JAMES E HARRIS" FirstName1-MiddleName1-PrimaryName1
    "123 N. MAIN STREET" HouseNumber1
    -StreetPrefixDirectional2-StreetName1-StreetSuffixType2
    "DO NOT MAIL"   ExceptionData5
    

Override table syntax validation for domain-specific rule sets

The syntax validation of the override tables is performed during Standardize or Investigation stage initialization.

If any syntax errors are found, the stage execution stops and an error message is written to the log file including the override table name, the contents of the invalid entries, and an explanation of the nature of the errors.

For each active token there is a corresponding instruction in the override statement. The instruction consists of the field named followed by a data flag. A valid data flag indicates the associated actions to be performed on the corresponding token. Each override instruction is separated by a hyphen (-). The only situation where there are fewer valid override instructions than active tokens is when a "move all remaining tokens" or "drop all remaining tokens" data flag is used (values 5,6,7,8, and 9 in the following table.

The three primary errors to check for are:

  • Invalid data flags (not a value listed in the following the table )
  • Invalid dictionary field names (not listed in the dictionary file of the rule set)
  • Incomplete override instructions (there was not a valid instruction for each active token)
Data flag table (used for domain-specific rule sets only):
Value Associated actions
0 (zero) Drop the current token
1 Append a leading character space, then append the original value of the corresponding token, to the specified dictionary field (no leading character space can be appended if the specified dictionary field is empty)
2 Append a leading character space, then append the standard value of the corresponding token, to the specified dictionary field (no leading character space can be appended if the specified dictionary field is empty, also if no standard value is available for the corresponding token then use the original value)
3 Append the original value of the corresponding token, without appending a leading character space, to the specified dictionary field
4 Append the standard value of the corresponding token, without appending a leading character space, to the specified dictionary field (if no standard value is available for the corresponding token then use the original value)
5 Move all remaining tokens that use their original values, leaving one character space between each token, to the specified dictionary field
6 Move all remaining tokens that use their standard values, leaving one character space between each token, to the specified dictionary field (if no standard value is available for any of the remaining tokens then use the original value)
7 Move all remaining tokens that use their original values, with no character space between each token, to the specified dictionary field
8 Move all remaining tokens that use their standard values, with no character space between each token, to the specified dictionary field (if no standard value is available for any of the remaining tokens then use the original value)
9 Drop all remaining tokens