SOUNDEX2 Routine

The SOUNDEX2 routine is used to match two strings using an improved Soundex algorithm.

Note: All SOUNDEX related routines are limited to working with attribute sizes of 256 characters. If the attribute length exceeds 256 characters, the algorithm will be applied to the first 256 characters for all SOUNDEX routines. The algorithm will be applied to the last non-blank 256 characters for all RSOUNDEX routines.

Algorithm

1.   Replace all non-leading vowels with A.
2.    Transform the following prefixes in this order:

From characters To characters

MAC

MCC

SCH

SSS

KN

NN

PF or PH

FF

K

C

3.    Transform these character combinations that occur after the first position in this order:

From characters To characters

CAAN

TAAN

NST

NSS

SCH SSS
DG GG

AV

AF

AW A
KN NN
PH FF

D

T

Q

G

Z

S

M

N

K

C

4. Replace H with A, unless it is preceded and followed by A (for example, AHA).
5. Remove all A characters except for the leading A.
6. Remove all but the first of repeating adjacent character substrings.
7. (For Relationship Linker) The comparison is limited to the first four characters returned for each field used in the Soundex2 routine.

Scoring for SOUNDEX2

Score

Description

0

Case 1: Both strings are blank

Case 2: Neither string is blank and they are not equal.

50

One string is blank; the other string is non-blank.

100

Strings are equal.