Date: Wed, 28 Aug 2002 18:25:40 +0100
Reply-To: Peter Crawford <peter.crawford@DB.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Crawford <peter.crawford@DB.COM>
Subject: Re: Reading Data from a Long List of Files
Content-type: text/plain; charset=iso-8859-1
try an infile statement like
infile 'your/path/file*' filename=filename .... ;
The global file name character '*' can be present like in DOS.
The infile option filename= can indicate the current file
(but predefine it with a long length).
Have a look in sas-l archives via www.sas-l.com
or the onlinedoc
good luck
Peter Crawford
Datum: 28/08/2002 16:59
An: SAS-L@LISTSERV.UGA.EDU
Antwort an: David Hopkins <dhopkins@EMAIL.ERS.USDA.GOV>
Betreff: Reading Data from a Long List of Files
Nachrichtentext:
Dear SAS-L,
I wonder if anyone has done this before?.....
I have to read in data from a long list of text files. All of the text
files are in one subdirectory, all by themselves. I don't know the names of
the files ahead of time.
Can my SAS job read in a list of all the files, store the names in a SAS
dataset and then use that information to read in all the data from those
files?
How would I do that? Are there a couple of different ways to do this sort
of thing?
--David Hopkins
www.ers.usda.gov
+---------------------------------------------------------------------------
--
| David E Hopkins....email:.... David.Hopkins@USDA.GOV
| USDA/ERS, room 3010 ......... DHopkins@email.ers.usda.gov
| 1800 M Street, NW
| Washington, DC 20036-5831...Web site:... http://www.ers.usda.gov/
|
| 202-694-5032
+---------------------------------------------------------------------------
--
--
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.