|
Is it the final report that you are really after? Then perhaps the GROUP BY, or HAVING clauses, are what you want. If you want to a) print a detail report b) print a summary report by one control break c) Print a tighter summary report by another control break. Then you might be better off to use SQL, (OPNQRYF if you just have to), to select and sort data for step A and write out data at control break time to a temp file. You could then process that temp file. Whether or not you have to use SQL (or OPNQRYF) may depend if you have a different sort (sales by city sorted on sales). Again writing out data to another temp file at control break time. Then again process that last temp file. Whether or not you have to use SQL (or OPNQRYF) may depend if you have a different sort (sales by region sorted on sales). You might get some suggestions for CPYFRMQRYF but that may not be the best solution for this situation. As this may imply 5 OPNQRYF's versus 3. The CPYFRMQRYF would make RPG cycle programming easier. Method CPYFRMQRYF OPNQRYF/CPYFRMQRYF RPGLE with no disk output OPNQRYF/CPYFRMQRYF RPGLE with no disk output OPNQRYF RPGLE with no disk output Method 2) OPNQRYF RPGLE with disk output OPNQRYF RPGLE with disk output OPNQRYF RPGLE Method 3) One single SQLRPGLE program with 2 temp files. Mary_Koetting@mail.mchcp.org on 01/26/2000 04:20:46 PM Please respond to MIDRANGE-L@midrange.com@Internet To: midrange-l@midrange.com@Internet cc: Fax to: Subject: OPNQRYF questions... 1. I want to use a series of OPNQRYFs where the results of the first is used in the second and those results used in a third, is this even possible? 2. If the OPNQRYF is joined with the record format specified, what file is the opened one? Is it the first one specified in the join, or the one specified as the record format? Examples would be helpful as the books aren't... Thanks! +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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 mailing list archive is Copyright 1997-2025 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.