Date: Wed, 3 Sep 2003 14:33:22 -0400
Reply-To: Michael Raithel <RAITHEM@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael Raithel <RAITHEM@WESTAT.COM>
Subject: Re: How to delete a table>?
Content-Type: text/plain
Dear SAS-L-ers,
Paul Choate posted the following question in reply to Kevin Viel's nice SCL
function solution to deleting SAS data sets on Windows:
> 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, aha; You have tilted your hand to reveal that you have the veritable
Ace of Spades of Operating Systems: MVS at your site! You are, of course,
correct that using the FDELETE SCL function would throw out the baby with
the bathwater by deleting every single SAS data set, index, catalog, view,
etc. in the OS SAS data library, by sending the OS data set to that great
big bit bucket in the sky.
I am not currently in a position to try this out, but I'll bet that
something along the lines of the following will work:
libname prodfile 'paul.choats.sasdata.library';
... Other SAS statements that do, whatever...
data _null_;
rc=delete('prodfile.doomed');
run;
Paul, the DELETE SCL function has a default of deleting SAS data sets. So,
the DOOMED SAS data set will be deleted from the PAUL.CHOATS.SASDATA.LIBRARY
SAS data library. SAS catalogs, views, and access descriptors may also be
deleted with the DELETE SCL function, but require some additional code that
is available in the SCL documentation.
Paul, best of luck to you as you send some of your MVS SAS data sets into
sudden and everlasting oblivion!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not reflect
those of my organization or my associates. All SAS code and/or methodologies
specified in this posting are for illustrative purposes only and no warranty
is stated or implied as to their accuracy or applicability. People deciding
to use information in this posting do so at their own risk.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance"
E-mail: MichaelRaithel@westat.com
Author: Tuning SAS Applications in the MVS Environment
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=55231
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fame is a vapor; popularity an accident; the only earthly
certainty is oblivion. - Mark Twain
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++