Steve,

I have since reverted back to my earlier simpler code. I have determined that if I default many of the options to =0, I can leave them in the DCB macro and they are ignored if not needed. (like RECFM='',LRECL=0,BLKSIZE=0,EODAD=0,)

The only parm that I have been unable to find a valid default is DSORG.

I need to generate the equivalent to:
SYS020   DCB   DDNAME=SYS020,MACRF=E

But, I have found that you can't used DSORG='' (or anything I have found) to create what I need. I finally set a special DSORG option for my macro that just generates the special purpose DCB in my macro.

Snips from my macro:
         MACRO
&NAME    Z@DCB &RECFM=,&LRECL=,&BLKSIZE=,&EODAD=,                 BOTH X
               &DDNAME=,&MACRF=,&DSORG=,                          Z/OS X
               &DTF=,&DEVADDR=,&IOAREA1=0,                        VSE  X
               &XXX=                                              JUNK
         AIF ('&SYSTEM_ID'(1,3) EQ 'VSE').DCBVSE
         AIF ('&SYSTEM_ID'(1,4) EQ 'z/OS').DCBZOS
         AIF ('&SYSTEM_ID'(1,6) EQ 'OS/390').DCBZOS
         MNOTE 8,'UNEXPECTED OPERATING SYSTEM'
SYSID    DC    C'&SYSTEM_ID'
         MEXIT
......snip......
.DCBZOS  ANOP

         AIF ('&DSORG' EQ 'NO').NODSO

&NAME    DCB  DDNAME=&DDNAME,MACRF=&MACRF,DSORG=&DSORG,                X
               RECFM=&RECFM,LRECL=&LRECL,BLKSIZE=&BLKSIZE,             X
               EODAD=&EODAD
         MEXIT
.NODSO   ANOP
&NAME    DCB  DDNAME=&DDNAME,MACRF=&MACRF
         MEXIT

Tony Thigpen

Steve Smith wrote on 6/15/24 6:53 PM:
Jonathan Scott's reply explains the details of why you can't macro macros.
But your scheme is way more complicated than necessary.  Take a look at the
ACB macro, which does what you want to do, as far as I can see.

sas

Reply via email to