"Fisher, Don" wrote:
>
> That worked, Barbara.  Thank you.
>
> Now why are the file fields not contiguous in program storage ...

The system (some component much lower-level than the RPG compiler)
organizes your fields in storage in the most efficient way.  Some fields
have to be aligned on say a 16-byte boundary (exact multiple of 16 bytes
from the beginning of the storage).  If the fields were laid out in the
order they were encountered, there would be a lot of waste space.

If you haven't specifically coded your fields to be contiguous (data
structure), then even if your fields happened to be contiguous after one
compile, they might not be if you add another field or change a field.
Even if you don't change your program, a new release or a PTF for the
compiler or the system could cause storage to be laid out differently.

Consider yourself lucky that the fields weren't accidentally contiguous
while you were first testing your code.




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.