|
Build a logical file or SQL index with keys you need for ordering.
Then RGZPFM, specifying above in KEYFILE parameter.
Then you will make physical sequence in a file match logical sequence you
need.
Then use your Input/Output technique to enable blocking.
Alexei Pytel
"Mark Bennett" <mbennett@clover.co.za> on 03/24/2000 02:11:32 AM
Please respond to RPG400-L@midrange.com
To: RPG400-L@midrange.com
cc:
Subject: Performance Issue
Hi,
I need to read a single file, sorted by 'product' and 'date' sequence and
recalculate the 'sequence' number.
This is a large file with several million records.
What is the most efficient way of doing this ?
I want to make use of record blocking to improve the performance.
I could possibly define an 'Input, primary' and an 'Output' file, thereby
obeying the rules for blocking. I can then CPYF the Output file back to the
original file with a replace. Changing the 'access path maintenance' to
*DLY
before running this pgm.
My problem is to sequence the 'Input, primary' file by 'product', 'date'.
Is
there a way of using OVRDBF or CHGPF or another way of sequencing the file
before I read it into my ILE pgm ?
Any suggestions are appreciated.
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
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.