Viewing the Values of All Current Macro Variables

  • Archive
  • SAS
This is one of our archive tips that we’ve kept as its still popular. Some of the information may be out of date. Get in touch if you need more help.

 

When developing or debugging a SAS application, it is often useful to check the values that have been assigned to Macro variables.

The easiest way to do this is to simply use the following command:

%put _ALL_;

In addition to _ALL_ you could use any of the following:

  • _USER_ to list only user defined macro variables;
  • _AUTOMATIC_ to list those defined by the SAS system;
  • _GLOBAL_ to list all session wide macro variables (global symbol table);
  • _LOCAL_ to list those macro variables local to the executing macro.

For more information on using the SAS macro language, view the SAS help or visit the SAS support site at www.support.sas.com.

Back to Insights

Talk to us about how we can help