SOUNDEX function

Syntax

SOUNDEX (expression)

Description

The SOUNDEX function evaluates expression and returns the most significant letter in the input string followed by a phonetic code. Characters that are not alphabetic are ignored. If expression evaluates to the null value, null is returned.

This function uses the soundex algorithm (the same as the one used by the SAID keyword in RetrieVe) to analyze the input string. The soundex algorithm returns the first letter of the alphabetic string followed by a one- to three-digit phonetic code.

Example

Source Lines
Program Output
DATA "MCDONALD", "MACDONALD", "MACDOUGALL" FOR I=1 TO 3 INPUT CUSTOMER PHONETIC.CODE=SOUNDEX(CUSTOMER) PRINT PHONETIC.CODE NEXT
?MCDONALD
M235
?MACDONALD
M235
?MACDOUGALL
M232