LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 3 Feb 2004 08:51:08 -0500
Reply-To:     "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject:      Re: Listing values of macro variables
Comments: cc: DHjelle@OTPCO.COM
Content-Type: text/plain; charset="us-ascii"

> From: Dean Hjelle [mailto:DHjelle@OTPCO.COM] > I think I read or heard that there is now a command that will > list the value of all macro variables that have been assigned > in a program but have been unable to find it. Does anyone > know what this command is?

as already provided %Put _ALL_;%*more than you wanted to know: includes SYS*; same as: %Put _automatic_;

%Put _user_;%*user-defined macro variables; same as: %Put _global_;

within a macro: %macro x(y=1); %Put _local_; %Mend;

SAShelp.vMacro and Dictionary.Macro contain the SYS* macro variables in sorted order but the user-defined mVars are in some automagically determined order which doesn't relate to being alphabetized.

PROC Print data = SAShelp.vmacro;%*contains _ALL_;

PROC Print data = SAShelp.vmacro (where = (Scope eq 'GLOBAL');

PROC SQL;select * from Dictionary.Macros;quit;

readable:

PROC SQL;select Name ,Value from Dictionary.Macros where Scope eq 'GLOBAL' order by Name ;quit;

see macro Put_User http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0209C&L=sas-l&P=R19537

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov

RTFM: I'm an engineer, I don't get paid to know, I get paid to know which Dictionary.Table it is in


Back to: Top of message | Previous page | Main SAS-L page