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 (March 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 5 Mar 2002 18:05:28 -0500
Reply-To:     "P. L" <li_9@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "P. L" <li_9@HOTMAIL.COM>
Subject:      Re: is there any efficient way concatenating SAS data sets?
Comments: To: Dale McLerran <stringplayer_2@YAHOO.COM>

On Tue, 5 Mar 2002 13:59:49 -0800, Dale McLerran <stringplayer_2@YAHOO.COM> wrote:

>P.L, > >If you have datasets named table1-table2000, then naming the datasets >can be done easily in a macro. > >%macro concat; >data all_tables; > set %do i=1 %to 2000; table&i(in=table&i) %end; ; > table = table1 %do i=2 %to 2000; + &i*table&i %end; ; >run; >%mend; > >%concat > > >I assume that you want to keep track of the original source table. >The variable TABLE as constructed above will keep track of which >of the 2000 original tables was the source table. > >Dale > > >--- "P. L" <li_9@HOTMAIL.COM> wrote: >> I'll use SET to concatenating about 2000 SAS data sets >> (table1-table2000). >> Is there any efficient way to complete the job without listing each >> file? >> Any help will be greatly appreciated. >> >> P.L > > >===== >--------------------------------------- >Dale McLerran >Fred Hutchinson Cancer Research Center >mailto: dmclerra@fhcrc.org >Ph: (206) 667-2926 >Fax: (206) 667-5977 >--------------------------------------- > >__________________________________________________ >Do You Yahoo!? >Try FREE Yahoo! Mail - the world's greatest free email! >http://mail.yahoo.com/

Dale,

Thanks for your very useful SAS code. I have one more question: if some tables are missing and the actual number is less than 2000 (let me say, there might be 10 files missing from table1-table2000, but I don't want to bother to know which one). How can I ask to SAs to avoid reading these missing tables? Thanks again.

Y.L


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