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



Hello everybody,

I have to create a report of most popular products based on sales amount in a 
given period.

Case 1
1.      Read an OPNQRYF based on a master file (@ 100,000 records in master 
file)
2.      Write work file based on the selection (@ 1000 records)
3.      Read work file with key1 (@ 1000 records)
4.      Do some processing
5.      Read work file with key 2 (@ 1000 records)
6.      Print report

Case 2
1.      Read an OPNQRYF based on a huge master file
2.      Write work file based on the selection (@ 10 records, yes only 10 
records)
3.      Read work file with key 1 (@ 10 records)
4.      Do some processing
5.      Read OPNQRYF based on the same huge master file (Will it read only 1000 
records selected by OPNQRYF or read again the whole file?)
6.      Print report

Which is the better option? Reading master file twice OR writing work file with 
more records (10 vs. 1000) and read it?

TIA,
Deepak


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.