Jon,

Thank you! My original problem is solved... I basically implemented a 
combination of items 3 and 4 below. Willy Jensen posted some code earlier in 
this thread that solves the issue (and Jonathan Scott posted a suggested 
algorithm along the same lines).

David

On Tue, 27 Feb 2024 14:16:45 -0500, Jon Perryman <[email protected]> wrote:

>On Tue, 27 Feb 2024 16:46:28 +0200, Binyamin Dissen 
><[email protected]> wrote:
>
>>How is different than the case at the bottom?
>>:>Because 24(R3) is not an expression. The second operand of the USING must 
>>be either a register number or a relocatable expression
>
>Sadly, HLASM improvements barely keep the product alive otherwise we would see 
>REXX as an alternative to macro language. While USING SOMELABEL,MYLABEL may 
>generate 24(R3) internally, you cannot specify USING SOMELABEL,24(R3). You 
>could argue 24(R3) is a relocatable expression. I suspect that EQU will have 
>the same problem. You must accept HLASM with its blemishes and learn to work 
>around those blemishes. Some solutions to your problem as follows:
>
>1. R3 is an EQU with type undefined. Maybe there is a type of "register" which 
>would allow 24(R3) to be considered a relocatable expression. R3 is ambiguous 
>because the assembler doesn't know if R3 represents a length, register or 
>index register.
>
>2. Maybe EQU supports type S-CON that would allow it to be used as an arg in 
>the MVC. E.g. LBL EQU 24(R3),TYPE=SCON,LENGTH=2 used in MVC LBL,OTHER. 
>
>3. Force the user to code a length of 2 or omit the length. If var contains 
>"(" then it must be "(2," or "(,".
>
>4. If var contains "(" then replace it with "(2," and let it fail if the user 
>coded a length.
>
>5. If you don't like using ORG then maybe EX is more to your liking. I'm not 
>saying I would use this method but different strokes for different folds.

Reply via email to