|
Sounds like a good solution Rich! Jeff Stevens Mize, Houser & Co. P.A. 913 451 1882 JStevens@xxxxxxxxxxxxxx Rich Duzenbury <rduz-midrange@xxxxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 11/09/2004 03:20 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Memory Allocation Question 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.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.