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 (November 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 2 Nov 2006 12:00:49 -0500
Reply-To:   Michael Rambo <michael.rambo@1199.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Michael Rambo <michael.rambo@1199.ORG>
Subject:   Re: Merging Multiple Datasets With Sequential File Names
Comments:   To: junkmail115@GMAIL.COM
In-Reply-To:   A<1162479814.397867.7540@m73g2000cwd.googlegroups.com>
Content-Type:   text/plain; charset="iso-8859-1"

Aaron,

I have a macro that does this very thing but my file names were listed as "file1" file2 ... file328 ... file1551. The counter in my macro would have to be tweaked to get you your file001 file002 and such. I'm not on a machine that has a SAS license today but I can send you my code now if you'd like.

hth,

Michael.

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of junkmail115@GMAIL.COM Sent: Thursday, November 02, 2006 10:04 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Merging Multiple Datasets With Sequential File Names

Either. There are 1770 files in text format and in SAS format.

"data _null_;" wrote: > SAS data sets or external files? > > On 10/30/06, junkmail115@gmail.com <junkmail115@gmail.com> wrote: > > I'm in need of some advice from a SAS guru. > > > > Is there a way to merge multiple files, which have a sequential naming > > convention (file001, file002, file 003 etc), into a master table that > > also creates a new variable derived from number in the file name? > > > > for example: > > > > Variables > > Name Date Cost > > > > file001 > > A 1/2006 4.25 > > C 2/2004 4.23 > > > > file002 > > J 4/2003 2.34 > > K 7/2001 5.32 > > > > Then merge the files into a master table: > > > > Variables > > Name Date Cost FileNum > > A 1/2006 4.25 001 > > C 2/2004 4.23 001 > > J 4/2003 2.34 002 > > K 7/2001 5.32 002 > > > > Anyone have a quick solution for me? > > > > Thanks Much, > > > > Aaron > >


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