|
I ran into this problem many years ago. I had a boss who insisted on it. The most efficient method I found was to generate the report to a disk file, keeping track of the number of pages. Then I had a generic program which read the file and dumped it to a spool file, inserting the number of pages where appropriate. I put a special character in the first byte of the line where the page number was, so I wouldn't have to scan every line. It worked well and had the advantage of making reprints easy, as long as the file was still around. We kept them in a special library and purged them once a month. There's no reason to write to a spool file on the first pass. It just adds extra work when you convert it to a disk file. You definitely don't want to make two passes against the data. +--- | 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.