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


  • Subject: Re: page n of x
  • From: James David Rich <james@xxxxxxxxxxxxx>
  • Date: Wed, 6 Sep 2000 15:10:36 -0600 (MDT)

On Wed, 6 Sep 2000, Gary Guthrie wrote:

> The CPYSPLF solution would not be my recommendation. CPYSPLF will only
> work for the plainest of spooled files. Because the CPYSPLF is roughly
> the same technique I described using APIs, I'd suggest foregoing the
> quick and dirty (not so robust) CPYSPLF method and just go with the APIs
> technique.

By the the API technique I assume you mean to create the spooled file with
'Page 1 of ###' and use the spool file APIs to change ### to the number of
pages?  I am unfamiliar with the spool file APIs, could you tell me which
book to read that explains the APIs you refer to?

> Regarding the "simple column in the magazine" suggestion - The concept
> is simple, but the amount of code would be too large to publish in its
> entirety. For what it's worth, I have code from my articles in "The RPG
> Source" on the website for the newsletter that does all the API work. I
> suppose I could write a short article describing the problem, describing
> the solution, and providing the portion to do actual work - capture the
> spooled file, update it with total pages, and re-spool it. The question
> has been asked enough that perhaps that would be useful to the public.
> 
> Votes for or against the article?

Article would be nice.  I will contribute (under LGPL) any code I write
that solves this problem.  My plan is this:

1. Create spool filewith 'Page n of ~~~' type heading (where n is the page
number).

2. Write procedure that will replace '~~~' with the total number of pages.

I think this is the easiest solution.  That way I can easily put 'Page n
of x' type headings on any report by adding one line of code to the
program, something like eval err=pagenofx(spoolfile).

Comments?

Note to the 'ridiculous business request':
'Page n of x' headings are useful for legal reasons.  Contracts (and
invoices are often contracts) carry such a heading to prove that each
party has the complete document.  Besides, I am getting paid to do it -
that is reason enough.

James Rich
james@dansfoods.com

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

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 copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.