|
At 11:53 06/08/1999 , Raj wrote: >Neil, > >Thanks a lot for your footnote. I realy appreciate that. How about after >CPYFRMQRYF, if I call an ILE RPG program , and if I read that file in that >ILE >RPG program . Just curious to know , Will it read the first record or the >last one? > >>Sorry about this late response, but a small footnote to the CPYFRMQRYF >>command. When you use this command it leaves the pointer at the end of the >>file so if you want to read from the file you need to use the command POSDBF >>before attemping a read. (this trap for young players had me scratching my >>head for a little bit) >> >>Cheers >>Neil It will read the record that POSDBF makes the current record. The reason you see this behavior is that the input file for OPNQRYF is (must be) opened with the SHARED(*YES) attribute. This means that there is only one file cursor, and since the file remains open until you close it with the CLOF command, the cursor stays at end of file where CPYFRMQRYF left it. If you don't need to update the original data, why not just read your CPYFRMQRYF output file? It will be quicker because only sequential access is required. Pete Hall pbhall@execpc.com http://www.execpc.com/~pbhall +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.