Date: Fri, 22 Jun 2001 07:16:25 -0700
Reply-To: Pete Lund <pete.lund@NWCSR.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Pete Lund <pete.lund@NWCSR.COM>
Subject: Re: Delete entries in Symbol table without exiting the SAS session
In-Reply-To: <PqzY6.112766$%i7.80359417@news1.rdc1.sfba.home.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Paula-
In V8.2, if you want to delete a single entry, try the %SYMDEL routine.
Here's a little log snippet - notice that TEST1 is removed:
9 %let test1 = Here is Value 1;
10 %let test2 = And here is Value 2;
11 %put _global_;
GLOBAL TEST1 Here is Value 1
GLOBAL TEST2 And here is Value 2
12 %symdel test1;
13 %put _global_;
GLOBAL TEST2 And here is Value 2
It would be pretty simple to wrap this is a macro that removed all the
global macro variables and left you with only the automatic variables
remaining. Setting the "symbol table to it's default" may be a bit more
problematic if you've done anything that changes an automatic variable and
you want it reset to it's default.
----------------------------------------------------------------------------
---
Pete Lund
Northwest Crime and Social Research
313-D Fifth Ave SE
Olympia, WA 98501
(360) 528-8970 - voice
(360) 280-4892 - cell
(360) 570-7533 - fax
pete.lund@nwcsr.com
www.nwcsr.com
----------------------------------------------------------------------------
---
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
paula
Sent: Thursday, June 21, 2001 9:02 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Delete entries in Symbol table without exiting the SAS session
Dear SAS friends,
I know if I creat macro variables properly, in the Symbol table, I should
see all the values assigned to it by executing
%put _all_;
But I always have to exit the SAS session to reset the Symbol table to its
default. Or I can not even change one single entry. Does anyone know anyway
to remove a macro variable (user defined, I mean) without exiting the
session? Thanks.
Paula D X