|
It will only work this way if you are doing matching records processing. Otherwise it will work like this Dow Not %EOF(primary) Read primary; // Calc specs EndDo; Dow Not %EOF(secondary) Read secondary; // Calc specs EndDo; And, honestly, I am not sure if it does the calc specs (the first time) before, or after, the read. I remember doing something like putting a record identification indicator and conditioning the calc specs on that indicator. I have an old RPG coding template that might show me this. And Alan, it's not just COBOL programmers. I sent some code to Jon Paris and it stumped him for quite awhile too, until he realized that it had a primary file. It's just not something that's assumed anymore. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com Tony Carolla <carolla@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 03/15/2005 05:09 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Record blocking optimization <snip> > Secondary files are optional. In general it works like this, it reads all > records from the primary file, and then reads all records from Each > secondary file in the order they are listed. </snip> I think I understand. When you say it reads all recs from primary, and then from secondary, I assume you mean that all files are read from on each loop through. A free format equivalent (minus record blocking) would look like this: Dow Not %EOF(primary) Read primary; Read secondary; // Calc specs EndDo; Right? This might be interesting to try, although having seven pairs of files to compare/synchronize, I would have to write seven programs. But if it is faster, I might try it. One last question. There is a possibility that a record might be missing from either file, causing the synchronization of the input streams to be out of whack. If this is the case, Can I issue a READ op in the calc specs to either file to re-synch the files? -- "Enter any 11-digit prime number to continue..." -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-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.