× 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: Gary Guthrie <GaryGuthrie@xxxxxxxx>
  • Date: Thu, 07 Sep 2000 14:51:52 -0500


My comments in-line


Buck Calabro wrote:
> 
> In my case, I need to know how many pages for each customer in a 80000
> page/15000 customer bill run.  In this case I have a work file that has the
> customer ID and total pages.  On the first pass I read all the source data
> and create an *SCS report, keeping track of each customer's page count and
> inserting "markers" for AFP graphics and "page x of y."  Then I CPYSPLF this
> to a disk file, pass through the sorted (by OPNQRYF) page count file (bills
> with more than 10 pages get special handling and are printed separately) and
> read the copied spooled data (which has the customer ID in the first columns
> of each record.)  This is the final pass - and it goes through the spooled
> file, not the source data.  The RPG program (I'm on topic!) then replaces
> the embedded markers with the appropriate graphic/page number/bar code/mail
> inserter tick mark and produces the final *AFPDS printer output.
> 
> There's no way I could afford to re-generate the bills from the source data
> TWICE.  The time window is just too small - there are literally millions of
> detail records to wade through.

In the case where the Page xxxx of yyyy needs to restart for each
customer in the spooled file (I think that's what I understand), it
seems that a "feature" of the option I proposed (spooled file APIs to
retrieve to user space, scan user space for marker, replace marker with
total page count, use spooled file APIs to re-spool) could be to have
multiple markers - in this case 2 markers. For example,


    Page _____ of ~~~~1

and

    Page _____ of ~~~~~

The scan and replace routine would search for, in this example, four ~
characters to indicate the need to insert a page count. It would check
the trailing character and if 1, set page count to 1, if ~ add 1 to page
count. Or whatever scheme floats the requirements boat!


> >The measure of a solution is not in
> >terms of the effort required to code
> >the solution, but rather in terms
> >of the robustness of the solution.
> 
> Say it again, Brother Gary!  It's music to my ears!!!


The measure of a solution is not in terms of the effort required to code
the solution, but rather in terms of the robustness of the solution.

There, I said it!  :)

Gary Guthrie
REAL Solutions Technical Support
NEWS/400 Technical Editor

+---
| 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 [javascript protected email address].

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