Dennis Lovelady wrote:
... *BUT* I don't know what
happens when the READ is to a data structure. Seems to me at that point
that the fields should be populated. If they're blank in that scenario,
then it seems to me that either there's mystery happening and the
READ-INTO-DS doesn't work like it appears to be designed (which I doubt), or
the compiler is wiping the unreferenced fields (which I also doubt).

But I think (if this is the issue) that you can hand-define those fields all
you want, and it won't eliminate the 7031 "error," and therefore neither the
compiler's propensity to remove them for efficiency's sake.

Barbara, am I off base here?


When the READ is to a data structure, the input buffer is copied to the data structure, so the entire data structure is changed, whether or not the individual subfields are referenced or not.

The 7031 behaviour only applies to whether fields are loaded during I-spec processing, which isn't used when there's a result DS.

Fields are sometimes loaded even when they have a 7031. For example, subfields, when the data structure itself is used, or any overlaying subfields is used. There are other reasons that would cause a field to be loaded, such as its being exported, or a parameter, or based, etc. The compiler can only skip it during I spec processing if it's sure the field's value can only be accessed through the field itself.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.