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



You could use OPNQRYF, SQL, Query400, or FMTDTA to sort the file.  If
there's an existing logical by product and date, you can write the output to
a file with a different name using the logical as the input file.  You can
still have blocking if you use a keyed file for input only and do no random
I/O.

I don't want to start a cycle war, but I don't think there's a performance
difference between explicit reads and the cycle in this sort of situation.  

I used to do a lot of work preparing mailing lists, and our standard
approach was read the input file, change the field(s) that needed to be
changed, write to a different member of the same file.  On the 510 we had
when I last did this, a 3 million record file would take well under 15
minutes to process in this way.  (We had no logicals over this file.  I'm
not sure how long rebuilding the access paths would take.)  If your output
file has the same record format as your input file, the code using explicit
reads would be almost as terse as a cycle program.  



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


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.