It's better to look at the documentation rather than just guessing!

The section "Rules for coding arithmetic expressions" for a SETA expression 
includes the following:

9. Ordinary symbols specified in arithmetic expressions must be defined before 
the arithmetic expression is encountered, and must have an absolute value.

EQU is not necessarily evaluated when encountered, but can be deferred and 
retried later if anything isn't yet resolved.  SETA must be evaluated when 
encountered.

I don't know of any way to get the difference of relocatable symbols in a SETA 
expression without generating an EQU for the difference.

Jonathan Scott

-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of Paul Gilmartin
Sent: 17 February 2026 18:27
To: [email protected]
Subject: Re: Calculating a SET symbol from a label

On 2/17/26 11:01, Seymour J Metz wrote:
> Look at the definition of expression on the page. It doesn't include 
> relocatable symbols.
>     ...
Are the symbols paired?  If so, the difference is absolute; if the SETA fails, 
report it as a bug.

Does EQU support complex relocatable values?

Look ahead should make no difference;  It should apply alike whether the 
expression is an operand of SETA or of EQU.

> ________________________________________
> From:  Paul Gilmartin
> Sent: Tuesday, February 17, 2026 12:31 PM

> On 2/17/26 10:08, Seymour J Metz wrote:
>> I have macros that need to set the values of a SET symbol to the difference 
>> of two relocatable symbols. I can generate an EQU and refer to it in the 
>> SETA, but that's ugly. Is there a cleaner way, or an RFE to provide one? 
>> Ideally I'd like a transfer function or a new pseudo-op.
> 
> ???
> <https://www.ibm.com/docs/en/hla-and-tf/1.6.0?topic=symbols-seta-instruction>:
>       variable_symbolSETAexpression

--
gil

Reply via email to