This works:
Macro
ZERO &N
SR &n,&n
Mend
zero 1
+ SR 1,1
-----Oprindelig meddelelse-----
Fra: IBM Mainframe Assembler List <[email protected]> På vegne af
Willy Jensen
Sendt: 14. november 2023 21:56
Til: [email protected]
Emne: SV: ASMA057E Undefined operation code SR 15,15
I'm pretty sure that you cannot have a variable for the entire expression, you
need one for each part. So one for the instruction and another for the register.
As someone mentioned
SR &n,&n
-----Oprindelig meddelelse-----
Fra: IBM Mainframe Assembler List <[email protected]> På vegne af
João Reginato
Sendt: 14. november 2023 21:49
Til: [email protected]
Emne: Re: ASMA057E Undefined operation code SR 15,15
now with LCLC and CSECT. Same error
João Reginato
(61) 9911-55500
Symbol Type Id Address Length Owner Id Flags Alias-of
HLASM R6.0 2023/11/14 17.46
XYZ SD 00000001 00000000 00000000 00
Page 3
Active Usings: None
Loc Object Code Addr1 Addr2 Stmt Source Statement
HLASM R6.0 2023/11/14 17.46
1 MACRO
2 ZERO &N
3 LCLC &REST
4 &REST SETC 'SR &N,&N'
5 &REST
6 MEND
000000 00000 00000 7 XYZ CSECT
8 ZERO 15
9+ SR 15,15
01-00005
** ASMA057E Undefined operation code - 00005/SR 15,15
** ASMA435I Record 5 in JOAO.QWASM.JOB09578.D0000101.? on volume:
10 END
Em ter., 14 de nov. de 2023 às 17:46, Paul Gilmartin <
[email protected]> escreveu:
> On 11/14/23 13:28:09, João Reginato wrote:
> > hi
> > I can't see the error on this simple code.
> > Can anyone help me pls?
> >
> > TIA
> > João Reginato
> > (+55 61) 9911-55500
> >
> >
> > Active Usings: None
> >
> > Loc Object Code Addr1 Addr2 Stmt Source Statement
> > HLASM R6.0 2023/11/14 16.58
> > 1 MACRO
> > 2 ZERO &N
> > 3 &REST SETC 'SR &N,&N'
> > 4 &REST
> > 5 MEND
> > 6 ZERO 15
> > 7+ SR 15,15
> > 01-00004
> > ** ASMA057E Undefined operation code - 00004/SR 15,15
> > ** ASMA435I Record 4 in JOAO.QWASM.JOB09574.D0000101.? on volume:
> >.
> I believe the SETC is unnecessary. How a bout just:
> MACRO
> &REST ZERO &N
> &REST SR &N,&N
> MEND
>
> START
> L ZERO 15
> END
>
> --
> gil
>