|
My first thought is to write the information to a temporary file in QTEMP. Multiple occurring data structures may work too. In other words, save the information you need to write until you determine if you need to write it - if you do need to write it, write it. On 5/18/06, Tomasz Skorża <t.skorza@xxxxxxxxxxxxx> wrote:
Hi My problem is regarding "saving" spool in some "place" and than decide if print it realy or not. I'll try to describe it more precisly. When I calling report program do following functions: 1) Write header record (say 5 lines) 2) Detail calculations 3) Write detail record (say 2 lines) 4) Total calculations 5) Write total record (say 3 lines) And problem is that only during 4-th point - total calculations I got all data based on them I can decide if record/point 1/3/5 shold be or shouldn't be realy write to finally spool/printout. The easiest way is reorgenize processing: 2) Detail calculations 4) Total calculations 6) check condition and 1) Write header record (say 5 lines) 3) Write detail record (say 2 lines) 5) Write total record (say 3 lines) But this way not always is possible to do. So my question is how to write record into some temporary "space" - all three records and than move them back to finally spool in order: 1) Write header record (say 5 lines) (into temporary space, complete 5 lines) 2) Detail calculations 3) Write detail record (say 2 lines) (into temporary space, complete 2 lines) 4) Total calculations 5) Write total record (say 3 lines) (into temporary space, complete 3 lines) 6) check condition and 7) Write header record/move from temporary space into finally spool 8) Write detail record/move from temporary space into finally spool 9) Write total record/move from temporary space into finally spool Regards. Tomasz Skorza -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.