One "maybe" option, just because there are 1M+ records in the file does
not mean you need to read them all.  If there is a balance field, or
calc that you can do on the 2 fields to "filter out 0 records" then you
may be able to create a view with substantially less records, and do
your sql with the same selection using the where clause of the same
criteria as the view (or read the view).  Try this with OPS Nav's
performance (or debug) and it will tell you if another view might be
better.  If every record has a value, the trigger/summary file idea
makes the most sense (may be best anyway).



John Bussert
Swift Technologies, Inc.
847-289-8939 (fax)

-----Original Message-----
From: []
Sent: Monday, January 14, 2002 10:26 AM
Subject: Re: sql help-select sum of 2 fields in flat file

I try to use SQL wherever possible, but in this case, it may be very
difficult if possible.  As I understand it, you're trying to sum fields
a record which are not externally described to allow SQL to identify

If you ultimately decide to try RPG native file access be sure to check
the BLOCK(*YES) keyword.  In some cases it can increase straight reads
a file.  Using the Blocking effectively is sometimes what appears to
SQL the advantage.  If it were me I'd try it with and without to see if
there was any difference.

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email:
To subscribe, unsubscribe, or change list options,
or email:
Before posting, please take a moment to review the archives

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by 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.