Date: Mon, 11 Feb 2008 13:01:36 -0500
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: How to download CSV files off Internet and assemble them in
one SAS file?
Content-Type: text/plain; charset="US-ASCII"
Funny you should ask this -- Last week I was reading about five years worth
of met. data. Take a look at the following code fragment:
filename met 'W:\Met data Downloads - Hourly Obs by month\*.txt';
Data Hourly ;
MISSING M ;
infile met dlm = ',' dsd missover ;
The filename has a wildcard indicator, the asterisk, which tells SAS to
read any file that has a .txt extension so you can read and combine all of
the files in a single SAS data step.
In my case, someone had already downloaded all of the files. Ideally, you
would point SAS to the NOAA site and read directly off if rather than
downloading the files manually. To do this, you use the URL engine as in
filename toto url
where I was pointing a specific USGS stream gage. However, AFAIK, you have
to log in to the NOAA site and I'm not at all sure how to do this with the
Good luck. I would be interested to learn how you solve the total problem.
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
How to download CSV files off
Internet and assemble them in one
02/11/2008 12:22 SAS file?
Please respond to
Is it possible to use SAS to download CSV tables from the Internet and
assemble the separate files in one SAS table? I would like to download
county data for tornados from the NOAA site, but there are about 1,500
separate sheets. The names of the tables are the dates for when the
sheets were prepared. I thought that if I can figure out what query to
create to download the data, I can simply use a macro and list all
dates going four years backwards.
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.