Hi John Ehrman,

Creating &SYSARGS from the macro argument won't resolve the problem you are
adding to the wishlist. Specifying &SYSARGS on the macro call will place the
entire value in a single &SYSLIST(#) variable. The request requires it also be
parsed in the underlying macro.

Can you give us some way to have the variable be parsed as part of the macro
call instead of passed as a single &SYSLIST(#) value?
&DCBPARM SETC 'DDNAME=MYDD,EODAD=MYEOD,MACRF=R,DSORG=PO,EXLST=&EXLST'
          DCB &SYSPARSE(&DCBPARM)

This would fix the real problem and allow existing code to function as before. I
think you sent a solution using global variables which would have been better
served using dynamic arguments. In the above example, the EXLST= could be
ommitted if &EXLST specified was blank (allows DCB default value to be used
where I must look at the DCB macro's default value for &EXLST - it's 1 - not
blank). Currently, we cannot omit the keyword from the call so I either must
code 2 or more versions of the DCB in my macro or make sure my macro defaults to
the same value in the DCB macro.

Jonathan Scott's Email tried to explain this but instead you picked up on
&SYSARGS. That Email explains how it should work similar AINSERT which I totally
agree with. Even if there were restrictions, it would be a great improvement on
not having the capability at all. I currently use AINSERT but I hate that
solution. &SYSPARSE( ) would be a good solution compared to AINSERT.

Personally, I don't think that creating &SYSARGS it's self would be useful. How
often would you pass every arg to an underlying macro? How often would you try
to scan &SYSARGS to find something since they are already parsed in the macro? A
list of the variables available on the macro definition would be more useful
than the entire arg string. At least the keyword list could be looped thru and
reference the values directly. I don't mind having &SYSARGS but I personally
just don't see it being used except in extreme situations.

Thanks, Jon Perryman.



________________________________
From: John Ehrman <[email protected]>
Was Subject: Re: Passing &SYSLIST to sub-macro.

Interesting suggestion; I'll add it to the "Wish List".  You're right that
similar ideas have been suggested in the past, but not in this specific
form.
John Ehrman

>I like the idea of a new symbol; maybe &SYSARGS that is a read-only symbol
that is the entire argument to a macro including both keyword and
positional parameters.  It would only have a scope of the current macro.
Thus, I could use it as a parameter to an sub-macro being invoked:
MACROX  ...,&SYSARGS.

Reply via email to