|
Thanks Rich. My second attempt (which I didn't tell about -- I was trying to avoid a novel ;) did just that. I made a discovery though, that over 50% of people have the same ss# -- Zero. I was actually doing one SetLL/ReadE pass through an LF that was keyed by DOB, and checking each match for one of the other two, then making another SetLL/ReadE pass through an LF keyed by SS#, and checking for name match (ss#+DOB matches caught by first pass). With all of the zero SS#s, this brought the reads down to around 294 Billion. On a system with normal activity during the day, it ran for over three hours, and reached 100 Million IOs, or 1/300th of processing time. 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 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.