LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (December 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 5 Dec 2002 13:27:39 -0500
Reply-To:     Quentin McMullen <Quentin_McMullen@BROWN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Quentin McMullen <Quentin_McMullen@BROWN.EDU>
Subject:      Re: Macro Variables: Deleting
Comments: To: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
In-Reply-To:  <F0161D3F7AC5D411A5BE009027E774D60409DD7A@gemmrd-scc013eu.gem.cibc.com>
Content-Type: text/plain; charset="iso-8859-1"

Harry Droogendyk wrote:

> Subject: Re: Macro Variables: Deleting > > %let var1 = 2345; > %let a = abcd; > %let z = qwer; > > %put _user_; > > proc sql noprint; > select name > into :mvars separated by ' ' > from sashelp.vmacro > where scope ne 'AUTOMATIC' > ; > quit; > > %symdel &mvars mvars; > > /* All gone? Except for &sql* variables */ > proc sql; > select * > from sashelp.vmacro > where scope ne 'AUTOMATIC' > ; > quit;

I think they really are All Gone after the %symdel statement (i.e. even the &sql* variables get deleted). It's just that when you run the second proc sql step to check, they get regenerated. If you change the last step to a data step, it will show that there are no maco variables with scope other than 'AUTOMATIC'.

126 %let var1 = 2345; 127 %let a = abcd; 128 %let z = qwer; 129 130 %put _user_; GLOBAL Z qwer GLOBAL VAR1 2345 GLOBAL A abcd 131 132 proc sql noprint; 133 select name 134 into :mvars separated by ' ' 135 from sashelp.vmacro 136 where scope ne 'AUTOMATIC' 137 ; 138 quit; NOTE: PROCEDURE SQL used: real time 0.01 seconds cpu time 0.01 seconds

139 140 %symdel &mvars mvars; 141 142 data _null_; 143 set sashelp.vmacro; 144 put _all_; 145 where scope ne 'AUTOMATIC'; 146 run;

NOTE: There were 0 observations read from the data set SASHELP.VMACRO. WHERE scope not = 'AUTOMATIC'; NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds

Kind Regards, --Quentin


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