Date: Thu, 10 May 2007 16:45:39 -0400
Reply-To: "data _null_;" <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_;" <datanull@GMAIL.COM>
Subject: Re: 'Local' datasets in Macro?
In-Reply-To: <051020071959.6431.464379B6000614140000191F220076106405029A06CE9907@comcast.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 5/10/07, Ian Whitlock <iw1junk@comcast.net> wrote:
...snip...
> Here is the log for creating a subdirectory of the work directory and then
> putting a simple data set in it. Unfortunately the work will *NOT* be
> wiped out when the SAS session is closed, probably due to containing a
> subdirectory.
This can be handled in Windows with RM. If we create it we can surely
delete it.
Thanks for pointing out that the directory needed to be deleted so SAS
will clean-up WORK properly.
Example using SYSTASK where LOCALPATH contains the unique name
generated when the macro is called.
systask COMMAND %sysfunc(quote(RM -R "&localPath")) wait;
systask COMMAND "RM -R ""F:\Temp\SAS Temporary
Files\_TD11780\eb368e77-ae01-418a-8c54-0fb2acca9242""" wait;
I never say never but I expect that creating a LIBRARY as a sub
directory of WORK is "safe enough" for any scenario that I could dream
up.