Gil, I took the bait and assembled two cases.

*  Case 1, symbol A is checked before definition:
         AIF   (T'A EQ 'F').SKIP
A        DC    F'42'
.SKIP    ANOP

*  Case 2, same as Case 1, but X is undefined:
         AIF   (T'X EQ 'F').SKIP2
A        DC    F'42'
.SKIP2   ANOP

Results:
Case 1, nothing was created and no (error) messages;
Case 2, symbol A was assembled as a fullword without error even though X is 
undefined.

It's possible to wrap anything around an axle, like division by zero.  
Mathematicians leave things like that alone, undefined.
But
        MVC    APPLES,=CL(LENGTH2)' '
LENGTH2  EQU   12
APPLES   DS    CL16

is not ambiguous.   Everything is defined if the assembler would simply look 
for it.

Abe, thanks for the suggestion of defining (at least some) symbols before code 
(kinda like Cobol!).   It works.


________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Paul Gilmartin <[email protected]>
Sent: Wednesday, August 5, 2026 6:13 PM
To: [email protected] <[email protected]>
Subject: Re: Assembler: Can you look ahead, just a bit?

On Wed, 5 Aug 2026 20: 26: 27 +0200, Abe Kornelis wrote: >Richard, > >I 
understand your disappointment. >HLASM is a bit picky in that it will use 
lookahead >in many cases, but not all. > Is the "but not all" clearly documented


On Wed, 5 Aug 2026 20:26:27 +0200, Abe Kornelis wrote:

>Richard,
>
>I understand your disappointment.
>HLASM is a bit picky in that it will use lookahead
>in many cases, but not all.
>
Is the "but not all" clearly documented in the Ref.  It should be
better than, "The developers tried their best.  We hope you
find it useful."

What error message should be given for cases which
have no valid resolution, such as:
         AIF   (T'A EQ 'F').SKIP
A        DC    F'42'
.SKIP    ANOP
This should result in an  error message.  Which?

With the expressive power of conditional HLASM it
might possible to write code that requires that the
solve logic puzzles that would please Lewis Carroll:
<https://urldefense.com/v3/__https://en.wikipedia.org/wiki/Zebra_Puzzle__;!!HaceldhrWm2T3s6H!310LNIlxgRQmDcoJUKyW8VqE8AylzvNn3NbVrzK_MsK0o3OH_wvQInZRK-mH15uDlJVDsizNvHSlDJJ0rHo3_Rhw6gDgAH7R4V9f5EBSLpsrWA$>

Should HLASM incorporate AI to solve all resolvable
constructs?  Perhaps it should fail on complexity
limits.

>This is one of those examples.
>
>I got into the habit of defining DSECTs,
>constants and the like at the top,
>rather than at the bottom of my pgm.
>
>By default neatly wrapped in PRINT OFF/ON
>to keep the listing clean of clutter.
>
>Some of my code relies heavily  on
>inheritance. For some attributes I ran
>into comparable issues.
>
>I cannot speak on behalf of the team,
>but my guess is that fixing this issue
>might potentially break someone else's code.
>
>Kind regards,
>Abe
>===
>
>
>On 05/08/2026 16:22, Richard Zierdt wrote:
>> This assembles w/o error:
>> LENGTH   EQU   12
>>          MVC   APPLES,=CL(LENGTH)' '
>> APPLES   DS    CL16
>>
>> This fails:
>>          MVC   APPLES,=CL(LENGTH2)' '
>> LENGTH2  EQU   12
>> APPLES   DS    CL16
>>
>> with this message:
>> ASMA151E Literal expression modifiers must be absolute and predefined - 
>> =CL(LENGTH2)' '

--
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN


Confidentiality Warning/Avertissement de confidentialité:

This message is intended only for the named recipients. This message may 
contain information that is privileged or confidential. If you are not the 
named recipient, its employee or its agent, please notify us immediately and 
permanently destroy this message and any copies you may have. Ce message est 
destiné uniquement aux destinataires dûment nommés. Il peut contenir de 
l'information privilégiée ou confidentielle. Si vous n'êtes pas le destinataire 
dûment nommé, son employé ou son mandataire, veuillez nous aviser sans tarder 
et supprimer ce message ainsi que toute copie qui peut en avoir été faite.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to