Wiki

Clone wiki

OYSTER / ScanHash_Function

The Scan function is a new hash algorithm that was created for OYSTER and introduced in v3.3 to complement the new UDI functionality (discussed in the previous few sections). The algorithm examines the string value either from left-to-right or from right-to-left (Direction), depending on which is specified, searching for the type of characters specified (CharType). As valid characters that match the CharType are found they are extracted to form the hash value until the requested number of characters (Length) has been found, or until the end of the value string is encountered. If the number of characters found is less than the number requested, the hash value is either left or right padded with asterisk (*), depending on the specified Direction, to meet the Length request. The algorithm also accepts Casing and Order parameters to designate operations to be performed on the hash value after the characters have been extracted. The Casing parameter allows the user to specify whether the letters in the hash value are to be converted to uppercase or left as is. The Order parameter allows the user to specify the reordering of the characters in the hash value. The syntax of the Scan algorithm is as follows:

#!xml


SCAN(Direction, CharType, Length, Casing, Order) 

As described above, the scan algorithm has the following five (5) parameters:

  • Parameters
  • Direction

    • Acceptable Values

      1.LR - scan string left-to-right 2.RL - scan string right-to-left

  • CharType * Acceptable Values

     1.ALL - extract all characters
     2.NONBLANK - extract only non-blank characters
     3.ALPHA - extract only letter and digit characters
     4.LETTER - extract only letters of the English alphabet
    
     * DIGIT - extract only digits 0-9
     * Length
    
     * Acceptable Values
          1.An integer between 0 and 30
          2.If the length is set to 0, SCAN will return all characters that meet the specified criteria. If the length is set to a value greater than zero, then SCAN will return up to the number of characters specified. If there are fewer characters than the length specified, it will pad the results with the asterisk (*) character.
    

    o Casing " Acceptable Values " ToUpper - all letters in the hash should be converted to upper casing. " KeepCase - all letters in the hash should keep original casing. o Order " Acceptable Values " SameOrder - keep original order in which the characters were extracted. " L2HKeepDup - reorder the hash characters from lowest to highest values. Keep any dup characters. " L2HDropDup - reorder the hash characters from lowest to highest values. Drop any duplicate characters from the hash.

Examples: the Table 1 shows some example uses of the SCAN algorithm along with how the various options affect the produced Hash value. Screen Shot 2019-09-10 at 5.35.23 PM.png

Back to OYSTER Reference Guide page

Click Prev UserDefined Example page

Click Next Cross-Attribute Compare CAC page

Updated