John McKown asked:
>I likely want something that is really impossible. I would like to write a
macro which does not specify any parameters, but can dynamically detect
them in the macro itself. For positional parameters, this could likely be
easy via &SYSLIST.

Not at all impossible!  Try something like this, where you can pre-process
and post-process a library macro.  You must define your macro inline, not
in the same SYSLIB sequence as the macro you want to front-end.

        Macro ,              Defined in the source program
&L      READ   &A,&B,&C
READ_XX OpSyn  READ          Save Wrapper's definition as READ_XX
READ    OpSyn  ,             Nullify this macro's definition
        - - -                ...perform 'front-end' processing
&L      READ   &A1,&B1,&C1   Call system version of READ
        - - -                ...perform 'back-end' processing
READ    OpSyn  READ_XX       Re-establish Wrapper's definition
        MEnd

This is one of several unusual macro techinques described in my SHARE
presentation; see the proceedings of the Anaheim SHARE conference in August
2012, Sessions 11194-5.  (The title of the session calls the HLASM macro
language "A++" because it's the most advanced macro facility in any
programming language I know of.)

John Ehrman.

Reply via email to