I think Scott Klement has a page of utility?
Found this link
http://iprodeveloper.com/systems-management/printing-page-x-y
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan
Shore
Sent: Tuesday, October 21, 2014 9:05 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: How to reliably determine total pages
Good
My responses ARE making it
I am not seeing my answers
Apart from that - I have heard of other people using that same process
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck
Calabro
Sent: Tuesday, October 21, 2014 12:02 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: How to reliably determine total pages
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.
--
--buck
'I had nothing to offer anybody except my own confusion' - Jack Kerouac
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.