|
In your RPG program, does the f-spec have the 'K' for keyed file? Without the 'K', RPG reads in arrival sequence. HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121 -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James Newman, CDP Sent: Thursday, November 03, 2005 12:58 PM To: MIDRANGE-L@xxxxxxxxxxxx Subject: Reading keyed file sequentially FWIW, I'm at V5R2. I have a "transaction-type" file that is keyed on company (10A) and date(D). Each day records are added for lots of companies. When browsing the PF, I was not surprised to see records not in the order specified by the key but in arrival order. However, I wrote a program to read this file sequentially and it read it that way too - not in keyed order. I know I could reorg the file before running the program to put the records in the order specified by the key. I also know I could create an LF and have the program read it. Because the file is really big (+20 million records) I did neither since I thought the reorg would run too long and the overhead of maintaining an LF would be too great. Thoughts? TIA. Jim Newman
As an Amazon Associate we earn from qualifying purchases.
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.