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 (April 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 5 Apr 2005 13:46:55 -0400
Reply-To:   Nathaniel_Wooding@DOM.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nat Wooding <Nathaniel_Wooding@DOM.COM>
Subject:   Re: Dataset wont Delete
Comments:   To: iw1junk@COMCAST.NET
Content-type:   text/plain; charset=US-ASCII

Ian

Guess what? Good old Proc Delete appears to work fine in this case.

For those who have not seen the proc, it dates back to somewhere around the dawn of SAS and has not been documented for a number of releases. However, it still works.

Here is Ian's code with Proc Delete inserted. I ran this using 9.1.1.

Nat Wooding

38 data _tojunk ; 39 x = 1 ; 40 run ;

NOTE: The data set WORK._TOJUNK has 1 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds

41 42 proc delete data= _tojunk ; *Proc Delete is an obselete proc that still functions; 43 run ;

NOTE: Deleting WORK._TOJUNK (memtype=DATA). NOTE: PROCEDURE DELETE used (Total process time): real time 0.00 seconds cpu time 0.00 seconds

44 data _null_ ; 45 set _tojunk ; ERROR: File WORK._TOJUNK.DATA does not exist. 46 put x= ; 47 run ;

NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds

Ian Whitlock <iw1junk@COMCAST. To: SAS-L@LISTSERV.UGA.EDU NET> cc: Sent by: "SAS(r) Subject: Re: Dataset wont Delete Discussion" <SAS-L@LISTSERV.U GA.EDU>

04/05/05 01:24 PM Please respond to iw1junk

Dan,

Several years ago somebody asked a question like this. As I remember it, SI has a special thing about data sets with names that begin with _TO. It seems to think this is there private name space for data sets. Of course, documentation for this is by secrecy.

This code (run on 8.2) seems to verify my memory.

data _tojunk ; x = 1 ; run ; proc datasets lib = work ; delete _tojunk ; run ; quit ; data _null_ ; set _tojunk ; put x= ; run ;

Try using the operating system instead of SAS to delete the data set.

Ian Whitlock =================== Date: Tue, 5 Apr 2005 12:30:59 -0400 Reply-To: Daniel Boisvert <djboisvert@HOTMAIL.COM> Sender: "SAS(r) Discussion" From: Daniel Boisvert <djboisvert@HOTMAIL.COM> Subject: Dataset wont Delete SAS experts, I am very confused. In my program I make a dataset (with PROC SQL) called _toexport. The dataset is then exported to EXCEL. I then try to delete the dataset so that it wont accidently get exported again using the following code: PROC DATASETS MT=DATA LIB=WORK KILL; QUIT; In the explorer window under work the _toexport dataset is not shown. But when I type VT _toexport on the command line, the dataset opens. Also if I do : DATA confused; SET _toexport; RUN; The data is read in! But, the following code brings up a warning that the dataset is not found! PROC DATASETS MT=DATA LIB=WORK; DELETE _toexport; QUIT;

Why can't I delete this dataset? Thanks, Dan


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