LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 15 Nov 2001 16:25:45 -0500
Reply-To:     "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:      Re: stacking large numbers of data sets
Comments: To: JSD <jsdavid1@HOTMAIL.COM>
Content-Type: text/plain; charset="iso-8859-1"

> From: JSD [mailto:jsdavid1@HOTMAIL.COM] > I am trying to stack a number of data sets, and I wonder if someone on > the list would know of a way to automate/streamline the process. > Suppose I have a number of data sets called "data_set_XX" (where XX is > a number; each data set was created within a loop and is given the > value of "i" for that particular loop). For example, the data sets > would look like:

proc SQL is the tool for this. "Macro loops no longer required." -- Ian Whitlock Where are your data sets? What is the LibName?

proc SQL noprint; select trim(MemName) from DICTIONARY.TABLES where MemType = 'DATA' and LibName = 'LIBRARY' into :LIST separated by ' ' ;quit; %put LIST<&LIST.>;

> data my_data_set_stack; > set &LIST.;

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov OpSys: Win_Pro Ver: 8.2 ---> cheerful provider of TESTED SAS code from the KludgeWrx !*! <---

By using your intelligence you can sometimes make your problems twice as complicated. -- Ashleigh Brilliant

By using your SQL you can sometimes make your problems -half- as complicated. -- RJF2


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