SYSPROCNAME Automatic Macro Variable

Contains the name of the procedure (or DATASTEP for DATA steps) currently being processed by the SAS Language Processor.
Type: Automatic macro variable (read only)

Details

The value of SYSPROCNAME contains the name of the procedure specified by the user in the PROC statement until a step boundary is reached.