On 2014-10-02, at 12:59, David Cole wrote:

> At 10/2/2014 02:12 PM, Paul Gilmartin wrote:
>> I wanted to generate a model (like MF=L) in my code CSECT; obtain storage of 
>> suitable length, copy the model there; establish addressability, perhaps 
>> with labelled/dependent USINGs, and store values known only at run time into 
>> fields in the obtained copy. I was never able to eliminate completely the 
>> "multiple resolutions" warnings, partly because USING provides for an upper 
>> limit to the addressable object, but no lower limit; partly because I put my 
>> dynamic copy after the RSA so I could use R13 as a base.
>> 
>> -- gil
> 
> It seems to me you can avoid the "multiple resolutions" warning by using 
> named USINGs.
> 
> RSA DSECT
> ...
>                 DS 0D
> EMBEDDEDINSTANCE DS XL(MODELLEN)
> ...
> 
> 
> MYCODE   CSECT
> ...
> MODEL    DS  0D
> FIELD1   DC  whatever
> FIELD2   DC  whatever
> MODELZ   DS  0X
> MODELLEN EQU *-MODEL
> ...
> 
>     GETMAIN rsa
> 
>     LR    R13,R1
> 
>     USING RSA,R13
> M    USING (MODEL,MODELZ),EMNEDDEDINSTANCE
> 
>     MVC   M.MODEL(MODELLEN),MODEL
>  
I got "multiple resolutions" because RSA appeared to overlap the
72 bytes of MYCODE prior to MODEL.  If I had been able to set
a lower limit on the named using the problem wouldn't have
occurred.  Imagine:

M        (MODEL,(MODEL,MODELZ)),EMBEDDEDINSTANCE

... where (MODEL,MODELZ) would limit both the bottom and the top
of addressability via the named using.

-- gil

Reply via email to