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 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sas-l@uga.edu
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


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