At 00:13 -0400 on 10/03/2014, Steve Smith wrote about Re: Macro to
generate DS or DC:
Your colleague may have been time-traveling... it's not an old
assembler, it's the new one that allows addressing across CSECTs,
with relative addressing. So, while LA R1,Field would generate the
address in your dynamic copy, a LARL R1,Field would still address it
the original CSECT.
Seems logically somewhat inconsistent, but it could also be useful, I suppose.
I haven't tried it, but I'm assuming the assembler has no reason (or
way) to warn you about it.
This issue, and the original one, can possibly be managed with some
advanced usage of CATTR statements to build separate program object
classes.
sas
I can see how the displacement between CSECTS can be computed by the
Assembler but this displacement can be wrong once the object deck is
link-edited/bound since the order of the CSECTS are not fixed. Unless
the LARL references RLDs (and thus adjusts for the location in the
program object or load module (as occurs with ACONS) any reference in
one CSECT to a location in another CSECT can be wrong.