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



On 10/21/2014 11:30 AM, Alan Shore wrote:
From past experience - I have found that there is no reliable formula to calculate what you are wanting
If this is a MUST - here is what I have done
Execute the logic twice but using a switch
The first time through, the switch is set off. Nothing is actually printed, but line counts, page counts are incremented as if it was
Save the page count
The second time through, the switch is set on to print the spool file, the line count is incremented as well as the page count the of page is the saved page count

Another way I've used is to generate the spooled file with a place
holder in the output that looks like 'Page 123456 of nnnnn' where the
123456 is the actual page number as generated by the RPG PAGE reserved
word. Once the spooled file is generated, copy it to a PF with CPYSPLF
and with another program, scan the spooled file for the place holder and
replace the nnnnn with the actual total page count. Then CPYF the PF
back to a spooled file.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.