|
Jim, >I remember hearing somewhere that fields >were not guaranteed to be contiguous in memory, is that true for external >declarations also? Yes it is true. To guarantee storage locations, you need to use a DS. As I mentioned in my other post, either declare an external DS based on the filename, or create a DS with (at least) the subfields comprising the array. If you do the latter, I recommend *only* listing the field names, which RPG IV lets you do so it will use the type/sizes from the record format. This can ease future maintenance since nothing is hard-coded. Along the same lines, I recommend you change the D6 array definition to use "Like(CFDX1)" instead of specifically declaring it as 9P 0. This way, if you ever change the record format, a recompile will automagically change the array element definition too. As Alan points out, you may want to reexamine the DB structure though since this isn't at least third normal form. But I took your question to ask how to mimic the RPG II code using external definitions... Doug +--- | 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 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.