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

On 10/2/2014 16:03, Paul Gilmartin wrote:
On 2014-10-02, at 12:44, Jonathan Scott wrote:
Initialised dynamic structures are supported, either embedded
within a contiguous area of initialised automatic storage or
allocated individually.  These are compiled as separate CSECTs
but copied to dynamic storage when initialised, then the CSECT
version is used as a map of the dynamic storage.  (Read-only
sections were defined using RSECT which was enhanced for HLASM
to perform reentrancy checks even when NORENT was specified).
This was particularly useful for MF=L parameter lists, which
only needed to be defined once.
Thanks.  I hadn't thought of multiple CSECTs, partly because
long ago an expert colleague strongly counseled me against them
based in his belief (now incorrect, I believe) that some old
assembler incorrectly presumed addressability across CSECT
boundaries.

So, with only the minor additional cost of a VCON to locate
the model CSECT and a transient base register to address it,
I might obtain storage for the writeable copy, copy the model
to it, drop the USING for the model and address the writeable
copy with a USING based on the model.  Of course, if I declare
the model read-only, I'll get RENT warnings on the writeable
copy.

Thanks again,
gil
.

Reply via email to