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.
I would be very surprised if I were the first person in the world in need of such a capability. John Bodoh -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Tuesday, March 19, 2013 11:14 PM To: [email protected] Subject: Re: Passing &SYSLIST to sub-macro. On Mar 19, 2013, at 13:39, John Ehrman wrote: > JRBodoh asked: >> Is there an easy way to pass the entire &SYSLIST to an internal macro for > processing? > > I know of no way to do this other than to enumerate the list items, as in > > MACROX A,&SYSLIST(1),&SYSLIST(2),... > > for as many arguments as you know are likely to be passed. Inelegant, but > workable. > Feels like a Requirement. I'm so accustomed to the "$@" construct and the "shift" command in POSIX shell that it seems a travesty that any macro processor not have similar. Perhaps something like a BIF: MACROX SUBLIST($SYSLIST,2:*) i.e. omit &1 and pass &2 through &(as many as there are) as separate arguments to MACROX. -- gil
