Because 24(R3) is not an expression. The second operand of the USING must be 
either a register number or a relocatable expression.

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר

________________________________________
From: IBM Mainframe Assembler List <[email protected]> on behalf 
of Binyamin Dissen <[email protected]>
Sent: Tuesday, February 27, 2024 7:01 AM
To: [email protected]
Subject: Why am I getting ASMA145E (was  Re: Macro parameters: parsing a 
relocatable address)

         MACRO ,
         MYCLC &P1,&P2
         LCLC  &C
&C       SETC  '&SYSNDX'
         DSECT ,
MY&C     DS    CL2
&SYSECT  CSECT ,
         PUSH  USING
         USING MY&C,&P1
         CLC   MY&C,&P2
         POP   USING
         MEND  ,

Fails on

                                     46          MYCLC 24(R3),ZERO
000006                00000 00008    47+         DSECT ,
000006                               48+MY0004   DS    CL2
000024                00000 00034    49+         CSECT ,
                                     50+         PUSH  USING
                                     51+         USING MY0004,24(R3)
** ASMA145E Operator, right parenthesis, or end-of-expression expected - (R3)

Not sure why the assembler doesn't accept this relocatable expression.

It will work if

BLAH   DSECT
             DS  10C
BLUE    DS   C


QWERT  DSECT ,
 BLIP   DS   F


            USING  BLAH,1
            USING  QWERT,BLUE   --  where BLUE is 10(1)

--
Binyamin Dissen <[email protected]>
http://www.dissensoftware.com/

Director, Dissen Software, Bar & Grill - Israel

Reply via email to