| Date: | Thu, 20 Jan 2005 11:52:51 -0800 |
| Reply-To: | nevin <nevinkrishna@HOTMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | nevin <nevinkrishna@HOTMAIL.COM> |
| Organization: | http://groups.google.com |
| Subject: | Weather URL data-URL access method |
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
Hello all,
I am playing with the URL access method in sas and am wondering if
anyone has had any luck in accessing weather data with sas? I am new to
this method and have played with some of the stock demos available on
sugi papers. I found one paper which uses weather data but when i run
the program i get an error..Below please find code and partial log..Any
ideas on what may be happening or any other url's that i can get
weather data from (particularly daily temps)? --the code is from Sugi
paper "interfacing the SAS system with the world wide web" by larry
Hoyle...Thanks in advance, Nevin
---------------------------code and log-------------------------
filename buoy URL
"http://www.met.fsu.edu:80/nws/cgi-bin/buoy.cgi?46045"
debug;
data B;
infile buoy;
keep dt tempair winddir windsp pressure tempsea waveht waveprd;
length slash dec $1;
input @3 slash char $1. @10 dec char $1. @ ;
if (slash eq'/' and dec='.') then do;
input @1 utcday 2.
@4 utchour 2.
@7 tempair 5.
@24 winddir 3.
@29 windsp 3.
@46 pressure 6.
@58 tempsea 5.
@64 waveht 4.
@69 waveprd 3.;
curmonth=month(date());
curyr=year(date());
dt=mdy(curmonth,utcday,curyr)*24*3600
+utchour*3600;
format dt datetime12.;
output;
end;
run;
NOTE: >>> GET /nws/cgi-bin/buoy.cgi?46045 HTTP/1.0
NOTE: >>> Host: www.met.fsu.edu:80
NOTE: >>> Accept: */*.
NOTE: >>> Accept-Language: en
NOTE: >>> Accept-Charset: iso-8859-1,*,utf-8
NOTE: >>> User-Agent: SAS/URL
NOTE: >>>
NOTE: <<< HTTP/1.1 404 Not Found
NOTE: <<< Date: Thu, 20 Jan 2005 19:46:36 GMT
NOTE: <<< Server: Apache
NOTE: <<< Vary: accept-language,accept-charset
NOTE: <<< Accept-Ranges: bytes
NOTE: <<< Connection: close
NOTE: <<< Content-Type: text/html; charset=iso-8859-1
NOTE: <<< Content-Language: en
NOTE: <<< Expires: Thu, 20 Jan 2005 19:46:36 GMT
NOTE: <<<
ERROR: Invalid reply received from the HTTP server. Use the debug
option for more info.
|