Date: Tue, 25 Mar 2008 08:47:53 -0700
Reply-To: Peter <crawfordsoftware@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter <crawfordsoftware@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: finding a variable in a dataset that has exactly/almost the
same name that i ask for?
Content-Type: text/plain; charset=ISO-8859-1
On Mar 25, 1:33 am, b.sar...@gmail.com wrote:
> Hi, the situation is : I have a dataset directory with 3 datasets A,B
> and C. In these datasets there are variables (numeric or char) named
> abc , pqr and xyz . Now, I know I am going to use these variables(or
> variables having familiar content) for some analysis every time, so
> without doing Proc Contents and manually finding the actual names of
> the variables, I wanted to know if there is some procedure which will
> point to the matching variable name I want? Can anyone help me? Thanks!
my guess is that you weant to know the names of datasets that hold
your variable named abc or pqr. Here is code. It creates a table
listing the libraries and members( tables ) which hold either of these
variables: age, sex
proc sql ;
create table found_it as
select distinct libname, memname
from dictionary.columns
where lowcase(name) in( 'age', 'sex' )
;
quit;
* guaranteed to find SASHELP.CLASS ;
|