Date: Wed, 12 Oct 2005 12:04:46 -0700
Reply-To: "Terjeson, Mark (IM&R)" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark (IM&R)" <Mterjeson@RUSSELL.COM>
Subject: Re: how to make each observation a macro value
Content-Type: text/plain; charset="us-ascii"
Hi,
You can use an nexted query inside
the WHERE clause to fetch the list
of name matches from your dataset.
data mydata;
memname='class ';output;
memname='company';output;
run;
proc sql noprint ;
create table result as
select *
from dictionary.columns
where lowcase(libname) eq 'sashelp'
and lowcase(memname)
in(select distinct lowcase(memname)
from mydata);
quit;
Hope this is helpful.
Mark Terjeson
Senior Programmer Analyst, IM&R
Russell Investment Group
Russell
Global Leaders in Multi-Manager Investing
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
subbhu
Sent: Wednesday, October 12, 2005 11:16 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: how to make each observation a macro value
I have a data set like this
memname Value
A P
B P
C P
D D
and I have a program which takes memname as the input to do the
processing, like this
proc sql noprint ;
select *
from dictonary.columns
where lowcase (libname) = 'lib' and
where lowcase (memname) = 'ae' ----------------------> instead of ae
here I want the program to read memname from the above data set and
process the sql query.