Jon's right. The tools should behave rationally and consistently even if the 
usefulness is not immediately obvious.

We see it in listserve posts. Someone will say "I coded blah blah" and it 
didn't work and someone will respond "well it's stupid, why would you code 
that?" (or words to that effect) and it turns out that there is a good reason, 
it was just complex and would have complicated the original question.

I remember coding this kind of thing as an experiment when I was learning the 
architecture. I recall that not only did it assemble, I saw that the assembler 
generated two RLDs and the link editor and loader handled it correctly:  when 
the program was loaded ADDR2 contained the address of DWD x 2.

Charles

-----Original Message-----
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> On Behalf 
Of Jon Perryman
Sent: Wednesday, September 3, 2025 11:08 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Question about HLASM complex relocatable expressions

On Wed, 3 Sep 2025 12:34:05 -0400, John Ganci <jgan...@verizon.net> wrote:

>Why would anyone use the definition of ADDR2 shown below?
>
>MYCSECT CSECT
>DWD      DS    D
>DWD2    DS    D
>ADDR2    DC    A(DWD+DWD)  Complex relocatable expression

Consider this from a different perspective. Is there a time when this becomes 
useful? This specific use case does not seem useful. However, variations on 
this might be useful. E.g. A(DWD+DWD-MYCSECT). DWD+DWD is resolvable so why 
make an exception because we don't see a use case.

Reply via email to