|
I need to summarize a big telephone master file (22M+) into ranges. I'm attempting to use read, reap, setll to avoid the need to read each phone number record to create this summary file. However, no luck so far.
a) Have a logical file thats keyed by: areacode, prefix, terminal and suffix (in that order)
b) At the start of your program do a "setll *start"c) use READ to get the area code, prefix and terminal and lowest suffix. Save them somewhere (maybe in a data structure). If the READ fails then you're at the end of the file and you're done.
d) using the area code, prefix and terminal from (C) and setting the suffix to *HIVAL, do a SETGT. Follow that with a READPE (but don't specify the suffix) to get the highest suffix.
e) write the summary recordf) Go back to step (C), continuing the loop until you've read the whole file.
--- Scott Klement http://www.scottklement.com
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.