&SYSMAC System Variable Symbol
By varying the subscripts attached to the &SYSMAC you can refer to the name of any of the macros called between open code and the current nesting level, that is, &SYSMAC(&SYSNEST) returns 'OPEN CODE'. Valid subscripts are 0 to &SYSNEST. If &SYSMAC is used with a subscript greater than &SYSNEST, a null character string is returned.
&SYSMAC with no subscript is treated as &SYSMAC(0) and so provides the name of the macro being expanded. This is not considered to be an error and so no message is issued.
The local-scope system variable symbol &SYSMAC is assigned
a read-only value each time a macro definition is called.
Notes:
- The value of the type attribute of &SYSMAC (T'&SYSMAC(n)) is U, unless &SYSMAC(n) is assigned a null character string, in which case the value of the type attribute is O.
- The value of the count attribute (K'&SYSMAC(n)) is equal to the number of characters assigned as a value to &SYSMAC(n).