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 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: subbhu <tataphani@GMAIL.COM>
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.


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