Date: Mon, 10 Feb 1997 17:08:54 +0500
Reply-To: Bernard Tremblay <bernard@CAPITALE.QC.CA>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Bernard Tremblay <bernard@CAPITALE.QC.CA>
Subject: Re: soundex in sas?
Hi,
Here is an extract from sas help about soundex function:
=========================================================================
SOUNDEX
Encodes a string to facilitate searching
Category: Character
Syntax
SOUNDEX(argument)
Description
argument is any valid character expression.
The SOUNDEX function encodes a character string according to an algorithm
originally developed by Margaret K. Odell and Robert C. Russel (US Patents
1261167 (1918) and 1435663 (1922)). The algorithm is described in Knuth, The
Art of Computer Programming, Volume 3.
The SOUNDEX function returns a copy of the argument encoded using the
following steps.
Step 1: Retain the first letter in the argument
and discard the following letters:
A E H I O U W Y
Step 2: Assign the following numbers to these classes of letters:
1: B F P V
2: C G J K Q S X Z
3: D T
4: L
5: M N
6: R
Step 3: If two or more adjacent letters have the same Step 2,
discard all but the first. (Adjacent refers to in the word prior
to discarding letters.)
The algorithm described in Knuth adds trailing zeroes and truncates the result to the length of 4. You can perform these operations with other SAS functions.
Examples
x=soundex('Paul');
put x;
The value returned is P4.
x=soundex('amnesty');
put x;
The value returned is A523.
======================================================
For more info look in technical report ps-222.
Regards,
Bernard Tremblay
\\\|///
\\ - - //
( @ @ )
+------oOOo-(_)-oOOo----------+---------------------------------+
| Bernard Tremblay | |
| La Capitale | Tel: (418) 646-2401 |
| | Fax: (418) 646-5960 |
| | Int: bernard@capitale.qc.ca |
+-----------------------------+---------------------------------+
| Imaginasys enr | Res: (418) 878-4447 |
| | Int: bertrem@quebectel.com |
+---------------Oooo----------+---------------------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
>>>From owner-sas-l@UGA.CC.UGA.EDU Mon Feb 10 16:59 EST 1997
>>>Encoding: 7 TEXT
>>>Date: Mon, 10 Feb 1997 13:38:00 PST
>>>From: "Chan, Pok" <Pok.Chan@WELLSFARGO.COM>
>>>Subject: soundex in sas?
>>>To: Multiple recipients of list SAS-L <SAS-L@UGA.CC.UGA.EDU>
>>>
>>>Hi, SAS-Ler:
>>>I have several big, big sas data sets need to be merged by last name. I
>>>know in ORACLE I can use soundex to merge soundslike last names, but how do
>>>this in sas? if I tried to avoid convert sas data set into oracle table?
>>>
>>>Thanks in advance.
>>>