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 (June 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Jun 2000 11:20:02 -0400
Reply-To:     Richard.Graham@INTELLICISIONS.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard W. Graham" <Richard.Graham@INTELLICISIONS.COM>
Subject:      Re: Reading from multiple flat files
Comments: To: "E. S." <sasq98@YAHOO.COM>
Content-type: multipart/mixed;
              Boundary="0__=5YkOLM4Zvq7sxSFdaUpppowIY5F8AsMhKusq6n6lYdwzHKU38LBpWUoP"

Ed,

try this

%MACRO readfile; %do i = 1 %to 200; data work._test; infile "c:\temporary files\file.dat%cmpres(&i)"; input ..... .. .. run; proc append base=work._final data=work._test; run; proc sql; drop table work._test; quit; %end; %MEND readfile; %readfile;

Regards,

Richard W. Graham Senior Consultant, Technology Delivery Intellicisions Data Inc. 2000 Regency Parkway, Suite 355 Cary, NC 27511 (919) 467-0505 (Embedded image moved to file: pic04104.gif)

"E. S." <sasq98@YAHOO. To: SAS-L@LISTSERV.UGA.EDU COM> cc: (bcc: Richard Graham/Tech/Intellicisions) Sent by: Subject: Reading from multiple flat files "SAS(r) Discussion" <SAS-L@LISTSER V.UGA.EDU>

06/09/00 10:44 AM Please respond to "E. S."

Hello SAS List, I have data distributed in a bunch of small flat files that I need to read and get together. The format of the files' names is: file.dat1, flat.dat2.......flat.dat200, etc. I am using Windows 95 and I am trying things such as:

data test; do i=1 to 200; infile 'c:\temporary files\file.dat'||i; input ... .. .. run;

which, of course, did not work. Any ideas would be appreciated very much.

Thanks, Ed

__________________________________________________ Do You Yahoo!? Yahoo! Photos -- now, 100 FREE prints! http://photos.yahoo.com


pic04104.gif [image/gif]


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