|
I just had a chance to check the archives, and back in September, 2002, I found this from Barbara Morris: " . . . even though the fields are contiguous in the file, they aren't necessarily contiguous in the program storage. But you can force them to be contiguous by coding an externally-described data structure. You just need to add one line to your program: D E DS EXTNAME(myfile) " and this from Jon Paris: "You need to use the file to describe an externally described DS. It is the only way you can guarantee that the fields will be contiguous in memory." These were in response to a question from Don Fisher, who was having trouble defining an array over fields in a data file (the fields seemed contiguous in the file, but the array was not being filled properly). The weight of expertise behind these opinions is what makes me pretty sure I'm right that my method works. And I don't have any gripe against LIKEREC - I was just reading the discussion of it's advantages and array definition piece caught my eye. . . . RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> writes: >Anyone else feel like jumping in? > >Rob Berendt >-- >"They that can give up essential liberty to obtain a little temporary >safety deserve neither liberty nor safety." >Benjamin Franklin > > >Hi Rob, > >Actually, I'm not chaining/reading into a data structure - my file is >externally defined, and I'm chaining/reading into the record format. > >My question is: Since I have an externally-defined data struture using the >same file, when I chain/read into the record format don't the fields end >up also being "in" the data structure? And since they're "in" the data >structure, aren't they contiguous? Mike Naughton Senior Programmer/Analyst Judd Wire, Inc. 124 Turnpike Road Turners Falls, MA 01376 413-863-4357 x444 mnaughton@xxxxxxxxxxxx
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.