Date: Fri, 23 Jul 2004 22:06:53 +1200
Reply-To: Laurie Fleming <feiraul@ESIDARAP.TEN.ZN>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Laurie Fleming <feiraul@ESIDARAP.TEN.ZN>
Subject: Re: how to delete datt sets??
In article <email@example.com>,
firstname.lastname@example.org (Saqi) wrote:
> Hi their,
> I am writing a small macro but can't think of anyway round it. I
> would like that macro to delete data sets that have RANNNN where
> nnnn=numeric four digit. There is also another data set that is
> called RASA. I want to delete RANNNN data sets but not RASA. Can
> anyone help please.
> Thanks in advance
As long as these are the only datasets in the library, you could do it
this way (assuming they are in a library called xyzzy)
Just to make sure, take backup.
proc copy in=xyzzy out=work;
proc datasets lib=xyzzy nolist nowarn mt=data;
Change rasa into a name that doesn't start with 'ra'
change rasa = save_rasa;
Delete all the datasets that start with 'ra'
Change it back again.
change save_rasa = rasa;