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 (October 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 26 Oct 2009 09:16:54 -0400
Reply-To:     Michael Raithel <michaelraithel@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Michael Raithel <michaelraithel@WESTAT.COM>
Subject:      Re: Delete All except One.
In-Reply-To:  <29c6cc56-5314-4bab-b982-ef2a7b609cc8@s6g2000vbp.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Dear SAS-L-ers,

Ash007 posted the following:

> > Is it possible to delete all the datasets of the Work except a dataset > (DST01) please. > Ash, hey man; you've gotta read the 'L as well as post to it! <VBG!> Why just two weeks ago I posted the following under my "Chance to Make SAS-L History: Did You Know That..." series:

...you can delete all SAS files in a given SAS data library _EXCEPT_ those that you specifically list in the SAVE statement in PROC DATASETS? Think of PROC DATASETS' SAVE statement as a kind of KEEP statement for SAS files, instead of for SAS variables. So, the following:

proc datasets library=raithlib; save FaveCDList FaveMovielist; run; quit;

...would delete the dozen or so SAS data sets, catalogs, etc. that I have in my RAITHLIB SAS data library, leaving my two favorite SAS data sets FaveCDList and FaveMovieList alone to face the world.

So, if you were paying attention, you would already know this!

Simply cut-n-paste the above example into your code, change library=raithlib to library=WORK, change the SAVE statement to DST01, and go for broke!

Okay, and for those who just don't get it; for those who just need to have it put in plain English; for those who simply can't read between the lines: <VBG>! Got that?

Ash007, best of luck in all of your SAS endeavors!

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

Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172

Author: The Complete Guide to SAS Indexes http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Your assumptions are your windows on the world. Scrub them off every once in a while, or the light won't come in. - Alan Alda +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


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