|
Hi Rob, <snip> Someone was using an OPNQRYF, and several other file in an RPG program. After the execution of the program it does the necessary CLOF and DLTOVR. A DSPJOB stuck in the CLP now shows no overrides. However numerous files were left open in the RPG program. When a RUNQRY runs only 5 records show out of a file that should be showing 8. We stuck in a CPYF to print and also only see 5 records. Then we modified the RPG program to turn on lr prior to exit and that resolved it. We now see all 8 records. Why? Buffering issue? The called RPG program writes the records to this file. </snip> The data is blocked, and is still in the program's output buffer. To "flush" the buffer, after each write to the file simply use the FEOD(n) op-code. This will force-end-of-data but (thanks to the (n) extender) will NOT force an immediate write to auxilliary storage. This way, the record is visible externally without the overhead of writing to disk. Works well for us with some of our comms jobs that require extremely fast through-put. It also means you don't have to write to a logical file that you may not need. HTH Larry Ducie
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.