Date: Tue, 2 Sep 2003 11:34:47 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: How to delete a table>?
Content-Type: text/plain
Bruce - Hill's original request was for a datastep method to delete a SAS
dataset. Being able to conditionally delete a dataset from a datastep could
have applications...
Paul
-----Original Message-----
From: Bruce Johnson [mailto:bjohnson@SOLUCIENT.COM]
Sent: Tuesday, September 02, 2003 10:55 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: How to delete a table>?
Paul, is there a reason why you don't want to use Proc Datasets?
________________________________
Bruce A. Johnson
bjohnson@solucient.com
-----Original Message-----
From: Kevin Roland Viel [mailto:kviel@EMORY.EDU]
Sent: Tuesday, September 02, 2003 12:54 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: How to delete a table>?
Paul,
Great question. I don't know. In fact, I don't even know how MVS
stores a SAS dataset :)
I work mostly on Windows. Unfortunately, I have not touched Unix in
over a year. I scoured my code for the SCL functions believing that I had
deleted a SAS dataset using another function. It took all of five seconds
to peruse my code because IT has my computer since it was wiped out by a
virus attack.
I briefly perused the online docs. I think there is a function, but
cannot say with certainty. If we watch this thread, perhaps a MVP will fill
in my ignorance.
Regards,
Kevin
On Tue, 2 Sep 2003, Choate, Paul@DDS wrote:
> This is great on Windows where a dataset is a file, but what about MVS
> where the library is the file? Can a MVS SAS dataset be deleted
> within a datastep?
>
> Paul Choate
> DDS Data Extraction
> (916) 654-2160
>
> -----Original Message-----
> From: Kevin Roland Viel [mailto:kviel@EMORY.EDU]
> Sent: Tuesday, September 02, 2003 9:54 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: How to delete a table>?
>
> Hill,
>
> You can delete datasets within a data step. In general, you
> need SCL functions. They are listed with all the other functions.
>
>
> data _null_;
> rc=filename("fname", "C:\x.sas7bdat");
> if rc = 0 and fexist("fname") then
> rc=fdelete("fname");
> rc=filename("fname");
> run;
>
> NOTE: You may want to follow this thread since FDELETE is supposed to
> work on external files.
>
> Regards,
>
> Kevin
>
>
> > -----Original Message-----
> > From: Hill Smith [mailto:ldh3@SINA.COM]
> > Sent: Tuesday, September 02, 2003 9:01 AM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: How to delete a table?
> >
> > Dear all,
> >
> > I know I can empty a data set by these codes.
> > data p;
> > set _null_;
> > run;
> >
> > But how can I thoroughly delete a table in data step? Thank you.
> >
> > Yours Hill Smith
> >
>
This message is a private communication. It may contain information that is
confidential and legally protected from disclosure. If you are not an
intended recipient, please do not read, copy or use this message or any
attachments, and do not disclose them to others.
Please notify the sender of the delivery error by replying to this message,
and then delete it and any attachments from your system. Thank you.
Solucient LLC.
|