Date: Thu, 23 Oct 2008 08:14:35 -0700
Reply-To: Akshaya <akshaya.nathilvar@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Akshaya <akshaya.nathilvar@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: merge 1000 dataset using sas macro
Content-Type: text/plain; charset=ISO-8859-1
If ALL the 1000 datasets are in the same library then:
/* UNTESTED */
Proc sql;
select memname
into :tomerge separted by ' '
from dictionary.tables
where libname=<library where datasets in>;
Quit;
Data output;
merge &tomerge;
by <by variable>;
Run;
One caveat in doing this, the dataset don't exclude unmatched
observations from the output dataset, since can't use the IN= data set
option and the subsetting IF statement in your DATA step.
Thanks!
Akshaya
|