Date: Tue, 27 Jan 2004 11:06:04 -0500
Reply-To: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject: Re: Can I have a wildcard in the middle?
Content-Type: text/plain; charset="iso-8859-1"
SQL offers the LIKE operator, used against sashelp views, it'll grab the
dataset names you're looking for. Use &ds in the delete statement in
into :ds separated by ' '
where libname = 'YOURLIB'
and memname like 'TEST%_S'
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
Sent: January 27, 2004 10:59 AM
Subject: Can I have a wildcard in the middle?
I'm sure that this is a no-brainer for everyone else on the list, but I need
know if SAS has a wildcard character which can be used in the middle of
I am running a proc data sets to delete some files:
proc data sets lib=pcdat memtype=data nolist;
What I want to delete are all data sets starting with 'test' and ending with
'_s' (test1_s, test2_s ...). What I am actually deleting with this code are
all data sets starting with 'test', regardless of what follows, and then I
a note telling me that the data set _s appears on the delete statement but
doesn't exist in the library. So obviously, the procedure is treating test:
all data sets starting with 'test' and _s as a completely new data set.
So does SAS have a way of putting a wildcard in the middle of a data set or
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!