× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Tue, 2004-11-09 at 14:51, Tony Carolla wrote:
> I am working on a program that, for good reason, runs loooooong.  I am
> looking through our account files to find matching accounts, where two
> of Name, DOB, SS# match.  We frequently deal with the same client in
> the same day, but create a new account for them (hospital
> billing--long story).  My task seemed easy at first, so I wrote it as
> follows:

Hmm, seems easier to just create three indexes:
DOB + Name, SS + Name, DOB + SS

You could then read each record in the account file, and then find the
potential matches with three sets of setll/reade loops.  

Now the I/O's get a lot fewer: 3.5M for the whole customer file, plus
lots of setlls with (mostly) non-matching reade's.  Additional reads
only when you find matches.   

I would probably write each account to a work file as it is 'seen' so
that it can't be listed more than once, so 3.5 million writes (or
perhaps updates to a 'seen' flag) as well.


--
Regards,
Rich

Current Conditions in Des Moines, IA
Broken Clouds
Temp 62.6F
Winds out of the Southwest at 16mph


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.