I realized that the workaround for message ASMA017W is to enclose the parms in
parenthesis. Your macro call would be MYDCB (DDNAME=TESTDD). The macro would be
as follows:

          MACRO ,
&L      MYDCB ,
&L      DS    0H

&PARMS  SETC ''
&CNT  SETA 1

.LOOP1 ANOP ,

&EQ      SETA  INDEX('&SYSLIST(1,&CNT)','=')
&KEYWORD SETC  '&SYSLIST(1,&CNT)'(1,&EQ-1)
&(&KEYWORD)   SETC  '&SYSLIST(1,&CNT)'(&EQ+1,K'&SYSLIST(1,&CNT)-&EQ) ,

&PARMS  SETC   '&PARMS.&SYSLIST(1,&CNT)'

&CNT      SETA    &CNT+1
               AIF    (&CNT LE N'&SYSLIST(1)).LOOP1

.LOOP2   ANOP  ,
               AIF    (K'&PARMS LE 71).LASTLIN
 &WORK  SETC  DOUBLE('&PARMS'(1,71).'X')
               AINSERT '&WORK',BACK
 &PARMS  SETC  '               '.'&PARMS'(72,K'&PARMS-71)
               AGO  .LOOP2

.LASTLIN  ANOP  ,
               AINSERT '&WORK',BACK
               MEND  ,

If you wanted, you could code your parms outside the parenthesis and replace
LOOP1 with &PARMS SETC '&SYSLIST(1)'(2,K'&SYSLIST(1)-2)

Regards, Jon Perryman.



________________________________
From: Jon Perryman <[email protected]>

3. Keyword parms not defined in the macro prototype get error message ASMA017W
which can be suppressed by *PROCESS SUPRWARN(17). I'm not a fan of this but it
can be used.

3a. Alternatively, you could change the parm coding structure to  MYDCB
(DDNAME,DDN),(MF,L),(MF,'(E,XXX)'). I'm not a fan of this but it is a better
choice than SUPRWARN.

Reply via email to