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



James Rich wrote:

>I need to put 'page n of x' on a printout.  
>I know I can easily use a dds keyword 
>to get the current page.  Is there 
>something that tells my program
>how many pages there are?  

Alas, no.  The way I do this is via a two step process.  Let's say I'm
printing bills.  The bill print program takes a parameter that tells it
whether this is the first pass or the second pass.  On the first pass, it
does all the normal printing, but leaves off the "page x of y."   At the end
of each customer's bill, store the number of pages for that customer in a
small work file (cust#, pages).  Then you DLTSPLF the output from the first
pass.  On the second pass, you chain out to the work file with the customer
number and place the "page x of y" and any special graphics, etc.

An alternative is to put a dummy "page 1 of y", "page 2 of y" etc. in the
printout, CPYSPLF it to disk and manipulate it there before doing a CPYF to
put it back into the output queue.

Another alternative is to use the spooled file APIs and the AFP toolkit to
construct the pages "on the fly" as it were.

Buck Calabro
Aptis; Albany, NY
"We are what we repeatedly do.
 Excellence, then, is not an act, but a habit." --Aristotle     


Billing Concepts Corp., a NASDAQ Listed Company, Symbol: BILL
+---
| 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 thread ...


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.