The problem is that 24(R3) really is not a relocatable expression. if you can come up with a business case for accepting displacement9register) on a USING, an RFE might bee accepted.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Assembler List <[email protected]> on behalf of Jon Perryman <[email protected]> Sent: Tuesday, February 27, 2024 2:16 PM To: [email protected] Subject: Re: Why am I getting ASMA145E (was Re: Macro parameters: parsing a relocatable address) 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.
