SYSINDEX Automatic Macro Variable

Contains the number of macros that have started execution in the current SAS job or session.
Type: Automatic macro variable (read only)

Details

You can use SYSINDEX in a program that uses macros when you need a unique number that changes after each macro invocation.