On Wed, 4 Jun 2025 12:38:11 +0300, Binyamin Dissen <[email protected]> wrote: > INNER &COUNT,&SYSLIST(1),&SYSLIST(2),&SYSLIST(3), + >Is there an easier way?
External functions (SETAF & SETCF) didn't have access to the callers SYSLIST/keyword arguments and ability to call a macro when I last looked at them. You might want to do a quick check because this would be the simplest implementation. My gut tells me no. There's not an obvious solution for keyword args. Also note that your solution may not work if your inner macro uses sublists. E.g. (a,b,c),d,e,f where &syslist(1) is passed as "(a,b,c)" instead of being parsed as (a,b,c). The solution is to use AINSERT but this can introduce other problems when used in inner macro calls because it may cause sequencing problems. Also note that n'&SYSLIST may include &SYSLIST(0) which I think is the label. I would create a member (not macro) that creates a variable that is AINSERTed. To use it, I would set &INNER_MACRO to " INNER " followed by COPY MEMBER. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
