|
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. Now, there are things you can do with matching records and stuff. But I've only used that once in a proof of concept, and it seemed interesting. Wait, I did screw up a matching records program on a S/36 back around 1984. When you compile with a primary file, that file will get a nice RNF7086-RPG handles blocking for the file. message. 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 03:50 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 Thanks for the info. That 'sequential only' language had me worried. <snip> > That said, on first listen, this sounds like it might lend itself to the > old RPG cycle, which still works in RPG-IV, if the idea is to optimize. > It's hard to beat the cycle, though I'm sure buffering optimization > would get close. Using primary and secondary, the compiler sets up the > optimum block size. </snip> My curiosity is piqued. My mindset has been on avoiding the cycle, and just optimizing this thing as best as I can (read blocking, using all DSs for input/output/updates, etc). Now this is a little humbling, but I am a late comer to the game of RPG (I have used IV only, and was taught to avoid the cycle at all costs), and I have never written a pgm using the cycle AND primary AND secondary input files. I know that if you specify a file as input primary, every record will be read from the file, and the calc specs will be repeated for each record, but I am not sure how the secondary file plays into this. Is a record automatically read from the secondary file also? -- "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-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.