• Subject: Re: String Searching
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Thu, 27 May 1999 14:58:24 -0600


In addition to/instead of using an alternate collating sequence, you might 
consider implementing a SOUNDEX algorithm.  Midrange Computing 
published an RPG version of this in September of 1995.  You should be 
able to locate it by searching on SOUNDEX on their website 

David Morris

>>> "Doug Holmes" <doug@netserv.ouac.on.ca> 05/27/99 01:42PM >>>

We stores people's names in our database in mixed upper-/lower- case, and mixed 
english/french characters.  We've gradually been experiencing little problems 
now with 
name searches, alphabetically sorted lists, etc., since the characters get 
sorted  {a,b, 
..., z, A, B, ..., Z} and english letters like "e" and "a" not being equal to 
"e`" and "a`" 
(i.e. letter with french accent above).  So, names like "de Silva" do not sort 
with the 
rest of the "D's", "von ..." do not sort with the rest of the "V's", etc. We've 
around a couple of solutions like:

1) storing another version of the name fields in strict upper-case/english 
only, and 
using that for searching, then displaying the other version to users

2) building temporary files containing the same as in 1) as needed

3) translating the data in the input records and search arguments on the fly as 
read from the file (which may mean reading the complete file in some 
applications, or 
at least more reads than just doing a basic "<search argument> SETLL <file> and 
<search argument> READE <file>" (we're RPG users <grin>). 

Does anyone have any other tricks or solutions that you'd be willing to share?

Thanks in advance,
  Doug Holmes
  Senior Programmer
  Ontario Universities' Application Centre
  P.O. Box 1328, 650 Woodlawn Road West
  Guelph ON, CANADA  N1H 7P4
  TELEPHONE: (519)823-1940, x 224   FAX: (519)823-5232

| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com

This thread ...

Return to Archive home page | Return to MIDRANGE.COM home page