I completed the program, and it runs in about two hours.  Thanks so
much Rich -- this again proves to me that most solutions can be found
on this system with effective use of the database.

Also thanks Scott.  I will probably try to make a version of this
program using memory, and possibly teraspace (when I figure out what
that is).

Also thanks Bob.  I have never used user indexes, but it sounds like
an interesting technology.


On Tue, 09 Nov 2004 15:20:09 -0600, Rich Duzenbury
<rduz-midrange@xxxxxxxxxxxxxxxxxxx> wrote:
> 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
> 
> --
> 
> 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 
> 


-- 
"Enter any 11-digit prime number to continue..."

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.