|
It turns out that I'll probably change my programming a bit. I have an SQL statement that I can add and ORDER BY ACCT# to and then just chain out when the ACCT# changes. Previously I pull in information on about 35 customers that we receive a certain EDI document from. The records come in any order, so I was checking this flag with each record that I read. Thanks for the input. -----Original Message----- From: Scott Klement [mailto:klemscot@klements.com] Sent: Friday, November 22, 2002 10:59 AM To: 'midrange-l@midrange.com' Subject: Re: %lookup vs. chain How big is the control file? Will you be adding data to the control file as you process the large files? Will the control file be sorted, so that %lookup() can search it efficiently? For a small control file that's already sorted, the %lookup BIF should be much faster than CHAIN. For a large file, especially if it's not sorted, CHAIN would be better... But, of course, you could always sort it. Finally, if you'll be adding to the array frequently, then having to re-sort it, that could affect performance. A user-index might be another alternative. On Fri, 22 Nov 2002, Mike Haston ** Data wrote: > I'm just noticing that as I spin through some large files that I'm chaining > out a million times (actually more) to a control file to check a flag. In > the initial subroutine I'm setting up an array that I could easily store > this flag in. I'm wondering what the opinion is as far as performance-wise > which is more efficient, doing the %lookup() on the array or chain to the > file? > _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-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.