|
Sounds like you know what you are doing. Using an output file will give you
the best performance. Try using opnqryf to presort your input file:
OPNQRYF FILE((FILEIN))
OPTION(*INP)
KEYFLD((FIELD1 *ASCEND) (FIELD2 *DESCEND))
SEQONLY(*YES 25)
ALWCPYDTA(*YES)
OPTIMIZE(*ALLIO)
Change the number of records
Christopher K. Bipes mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc. http://www.cross-check.com
6119 State Farm Drive Phone: 707 586-0551 x 1102
Rohnert Park CA 94928 Fax: 707 586-1884
If consistency is the hobgoblin of little minds, only geniuses work here.
Karen Herbelin - Readers Digest 3/2000
-----Original Message-----
From: Mark Bennett [mailto:mbennett@clover.co.za]
Sent: Friday, March 24, 2000 12:12 AM
To: RPG400-L@midrange.com
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.