Date: Tue, 8 Jun 2004 13:42:41 -0700
Reply-To: TW Socos <bodybuilder@SCIENTIST.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: TW Socos <bodybuilder@SCIENTIST.COM>
Subject: Re: Infile Data from CGI Generated Web Page
Content-Type: text/plain; charset=ISO-8859-1
Thank you for the info. I am behind a firewall and have tried the
suggestions you provided, but to no avail. Here is the info I am
receiving when running w/ the DEBUG option.
NOTE: >>> GET /cgi-bin/Phoenix/redirect.pl?pil=MAY2004&depth=0&Print=144
NOTE: >>> Accept: */*.
NOTE: >>> Authorization: Basic
NOTE: >>> Accept-Language: en
NOTE: >>> Accept-Charset: iso-8859-1,*,utf-8
NOTE: >>> User-Agent: SAS/URL
NOTE: <<< HTTP/1.0 400 Host Header Required
NOTE: <<< Date: Tue, 08 Jun 2004 20:00:41 GMT
NOTE: <<< Via: HTTP/1.1 www.wrh.noaa.gov (Traffic-Server/126.96.36.199-Dell
[c s f ])
NOTE: <<< Cache-Control: no-store
NOTE: <<< Content-Type: text/html
NOTE: <<< Content-Language: en
NOTE: <<< Content-Length: 468
ERROR: Bad request. Use the debug option for more info.
NOTE: The SAS System stopped processing this step because of errors.
Interestingly, this is not a problem when downloading data from other
websites (e.g., census data from US census site, etc., yahoo financial
data, etc.). Any info you can provide would be very helpful.
"Richard A. DeVenezia" <email@example.com> wrote in message news:<2ikb0pFohnauU1@uni-berlin.de>...
> TW Socos wrote:
> > Hello. I am interested in creating a dataset based on data presented
> > on the National Weather Services website. I want to automate the
> > process utilizing the SAS http protocol. The problem I am having is
> > the pages I am interested in capturing data from are generated by a
> > CGI and I cannot connect to the page by specifying any of the standard
> > CGI ports (or the standard html port of 80). Here is an example of a
> > URL I am attempting to capture data from:
> > /******************* CODE UTILIZED **************************/
> > filename weather URL
> > /* (where XX is a variety of different ports that I tried)... */
> > data Weather_May_2004;
> > infile weather;
> > input wdata $char250.;
> > run;
> > /* Log Reads: ERROR: Bad request. */
> > Any assistance you could provide would be greatly appreciated.
> > Thank you,
> > TW
> You code worked for me. I used :80. I wasn't behind a firewall.
> You might be stuck behind a firewall and that could interfere. There are
> filename options for negotiating with the firewall; PROXY=, USER= and PASS=.