× 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.



Or use an Input primary on the new logical, breaking on the key fields, and
writing a summary record at L1 time.  Fast, very fast. 
 
---------------------------------
Booth Martin
http://www.martinvt.com
---------------------------------
-------Original Message-------
 
From: RPG programming on the AS400 / iSeries
Date: 08/18/05 16:56:06
To: RPG programming on the AS400 / iSeries
Subject: Re: a need for speed
 
> 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 record
 
f) Go back to step (C), continuing the loop until you've read the whole
file.
 
---
Scott Klement  http://www.scottklement.com
 
--
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 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.