Tony,
Remove the &NAME from the ZDCB invocation.
Despite the error the label is probably defined to HLASM.
If that does not resolce it, then I'd check the symbol cross reference
to see where the prior definition of SYS020 occurred.
Set PRINT option to make sure that line is printed and check which macro
generated it.
Success!
Abe
===
Op 15/06/2024 om 06:15 schreef Tony Thigpen:
> I have a macro that is giving strange results, so I must be doing
> something wrong.
>
> The macro is used so that I can easily port z/VSE and z/OS code
> between the two operating systems. It was working until I needed to
> handle operands that are null.
>
> MACRO
> &NAME Z@DCB &RECFM=,&LRECL=,&BLKSIZE=,&EODAD=, BOTH X
> &DDNAME=,&MACRF=,&DSORG=, Z/OS X
> &DTF=,&DEVADDR=,&IOAREA1=0, VSE X
> &XXX= JUNK
> ....
> .DCBZOS ANOP
> &DDNX SETC 'DDNAME=&DDNAME.'
> &RECX SETC ',RECFM=&RECFM.'
> &DSOX SETC ',DSORG=&DSORG.'
> &LREX SETC ',LRECL=&LRECL.'
> &BLKX SETC ',BLKSIZE=&BLKSIZE.'
> &EODX SETC ',EODAD=&EODAD.'
> &MACX SETC ',MACRF=&MACRF.'
> AIF ('&RECFM' NE '').RFM
> &RECX SETC ''
> .RFM ANOP
> AIF ('&DSORG' NE '').DORG
> &DSOX SETC ''
> .DORG ANOP
> AIF ('&LRECL' NE '').LREC
> &LREX SETC ''
> .LREC ANOP
> AIF ('&BLKSIZE' NE '').BLKS
> &BLKX SETC ''
> .BLKS ANOP
> AIF ('&EODAD' NE '').EOD
> &EODX SETC ''
> .EOD ANOP
> AIF ('&MACRF' NE '').MAC
> &MACX SETC ''
> .MAC ANOP
> &PARMS SETC '&DDNX.&DSOX.&LREX.&BLKX.&EODX.&MACX.&RECX'
>
> &NAME ZDCB &PARMS
> &NAME DCB &PARMS
>
>
> The two identical lines with ZDCB and DCB are just so that the first
> one prints (with an error) before the second one attempts to work.
>
> My first example is really stripped down:
> SYS020 Z@DCB MACRF=E,DDNAME=SYS020,DTF=NO
>
> The assembly reports:
>
> 1202+***************************************
> 1203+SYS020 ZDCB
> DDNAME=SYS020,MACRF=E
> ** ASMA057E Undefined operation code - Z@DCB/ZDCB
> ** ASMA435I Record 120 in SYS1.PROZ.COPYLIB(Z@DCB) on volume: RESCUG
> ** ASMA254I *** MNOTE *** 1207+ 12,*** IHB052 DSORG
> OMITTED
> ** ASMA254I *** MNOTE *** 1209+ 12,*** IHB066
> INCONSISTENT OPERANDA
> 00081C 1210+SYS020 DS 0F GENERATED TO
> DEFINE NAME
>
> Yet, just for testing, I also coded a basic DCB that is identical to
> waht the macro is generating, and it works.
>
> 1212 SYS020 DCB
> DDNAME=SYS020,MACRF=E
> 1215+* DATA
> CONTROL BL
> 1216+*
> 00081C 1217+SYS020 DS 0F'0' ORIGIN ON
> ** ASMA043E Previously defined symbol - SYS020
> no other errors on the usage of DCB.
>
> I assume that I must be hitting some quirk in how macros work when
> generating parms for another macro.
>
>
> Tony Thigpen