Here are some features that can be used to get around the assembler limitations:
1. You will need to use the AINSERT command to generate the DCB command instead
of using the DCB directly in the macro. WARNING AINSERT inserts after the
first level macro call so if other instructions are inserted, then the sequence
will be disrupted. It does however allow parms to be dynamically specified thru
variables.
2. AINSERT has the same restrictions assembler statements (e.g. continuation
column and 72 as line continuation character). Your macro must create multiple
AINSERT statements if your statement is past 72. Alternatively, you may want to
look at the assembler exit that someone created for bypassing continuation
column and see if it can be used to reduce the restrictions. I can't remember
who created it or where it can be found.
2a. Maybe the assembler exit mentioned above could be slightly modified to help
you do what you need.
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.
4. If you need to split a variable value contiaining keyword / arg then use the
following:
&EQ SETA INDEX('&SYSLIST(1)','=')
&KEYWORD SETC '&SYSLIST(1)'(1,&EQ-1)
&ARG SETC '&SYSLIST(1)'(&EQ+1,K'&SYSLIST(1)-&EQ)
5. AREAD could be used to read statements following the macro. This could be
helpful in some situations.
Regards, Jon Perryman
________________________________
From: "McKown, John" <[email protected]>
I would like to write a macro which does not specify any parameters, but can
dynamically detect them in the macro itself.
But I don't see any way to find and process "keyword" type parameters.
Basically, I want to make a MYDCB macro which is similar to the DCB macro, but
with some code wrapped around the DCB macro. And I don't want to worry about
maintenance to the DCB macro. So I want the MYDCB macro to be a "child" of the
DCB macro and "inherit" all the DCB macro's parameters, adding a few of my own.