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



Gary Guthrie wrote:

<regarding a two passes approach>

>Two obvious flaws are
>
>1) There's no guarantee that the 
>data has not changed between runs of
>the report. This means incorrect output.

The obvious solution to the "data are dynamic" problem is to checkpoint the
data.  Either put an "in billing" flag or simply copy the data to another
file/library, but as you say, there's a better way...

>2) If the report is created from I/O 
>intensive (or for that matter,  anything 
>that runs for a LONG time) attributes 
>such as reading a few HUGE files, 
>there is a penalty. If the report takes 
>12 hours to produce now, it will take 
>24 hours to produce with the 
>simple-to-code solution.

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.

>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!!!

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-Ups:

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.