| Date: | Tue, 29 Dec 2009 14:20:47 -0800 |
| Reply-To: | Patrick <patrick.matter@GMX.CH> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Patrick <patrick.matter@GMX.CH> |
| Organization: | http://groups.google.com |
| Subject: | Re: Keep only variables with specific characters |
|
| Content-Type: | text/plain; charset=ISO-8859-1 |
|---|
Pretty much the same as Frank's version; but tested and also using the
libname to filter data for &namelist;
data DATA_HAVE;
c1fpop1=1;
c2fpop2 =1;
c3fpop3 =1;
c1mpop1 =1;
run;
proc sql noprint;
select name into :nameList separated by ' '
from dictionary.columns
where libname='WORK' and memname = 'DATA_HAVE' and upcase(name)
like'%FPOP%'
;
quit;
data want;
set DATA_HAVE (keep=&nameList);
run;
|