Focal Point
[SOLVED] Soundex - phonetic first name

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7877085795

January 25, 2011, 04:17 PM
JW777
[SOLVED] Soundex - phonetic first name
DEFINE FILE FMT_MASTERPRTY
PH_LN/A6=SOUNDEX('9', LNAME, PH_LN);
PH_FN/A6=SOUNDEX('20', FNAME, PH_LN);
END
-*
TABLE FILE FMT_MASTERPRTY
PRINT
LAST
FIRST
BY PH_LNAME
BY PH_FNAME
BY DATEOFBIRTH
WHERE RECORDLIMIT EQ 500
END


OUTPUT

PH_LNAME PH_FNAME LAST FIRST DATEOFBIRTH
A450 A211 ALLEN ASIA
A450 A231 ALLEN ASIA


A426 M612 ALGARIN MARIA
A426 M625 ALGARIN MARIA


A000 R163 AYO ROBERT
A000 R163 AYO ROBERT


I was sorting by phonetic last and first name. Can someone explain why would the PH_FNAME is different when the first name are identical. Then sometimes the PHON_FNAME is the same. This is the first time that I am trying to use SOUNDEX, so maybe I don't have a full understanding of it. Please help.

Thanks
jw777

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
January 25, 2011, 10:41 PM
jimster06
I would verify the field sizes and positions in the master for both the last and first names.

HTH


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
January 26, 2011, 07:39 AM
Alan B
At some point between WF4.3 and WF7.1, the SOUNDEX routine changed.

In 4.3 I succesfully used SOUNDEX, never an issue.

In 7.1 onwards I have seen exactly this behaviour. Total lack of consistency.

Maybe open a case on it, as I used different methods as a WAR.


Alan.
WF 7.705/8.007
January 26, 2011, 09:56 AM
Francis Mariani
PH_LN/A6=SOUNDEX('9', LNAME, PH_LN);
PH_FN/A6=SOUNDEX('20', FNAME, PH_LN);


I noticed you sometimes get different values depending on the input string length specified in the function call, I'd make sure they're the length of the string - is LNAME really 9 characters long?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
January 26, 2011, 10:29 AM
JW777
Thanks, I checked my master file and I realized the length of the strings were wrong. The last name should be '20' and the first name should be '9'. Now the output makes sense.


WebFOCUS 7.6
Windows, All Outputs