Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Reading the data from the Internet
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sas_recruit@tranzxn.com  
View profile  
 More options Dec 30 2003, 6:02 pm
Newsgroups: comp.soft-sys.sas
From: sas_recr...@TRANZXN.COM (sas_recr...@tranzxn.com)
Date: 30 Dec 03 19:51:46 GMT
Local: Tues, Dec 30 2003 2:51 pm
Subject: Re: Reading the data from the Internet

Good friend and a terrific SAS Programmer Ted Conway had a award winning paper in SUGI 28.
Basically, the program reads stock market data from a webpage into SAS and puts it on Excel. Paper
73 in SUGI 28 book. It is not exactly what you are looking for but it should help.

Regards,
G. Raychaudhuri
Tranzxn Inc.

----- Original Message -----
From: Choate, Paul@DDS
To:            SA...@LISTSERV.UGA.EDU
Sent:         Mon, 29 Dec 2003 16:23:05 -0800
Subject: Re: Reading the data from the Internet

Dea - Try this- this example brings in the NEMA sheet.

FILENAME website HTTP
'http://www.iso-ne.com:80/settlement-resettlement/SMD_operating_reserv...
mary/200311_OR_Summary.xls';

data file;
   n=-1;
   infile website recfm=s nbyte=n length=len;
   input;
   file  "200311_OR_Summary.xls" recfm=n;
   put _infile_ $varying32767. len;
  run;

PROC IMPORT OUT= WORK.D200311_OR_Summary_NEMA
            DATAFILE= "200311_OR_Summary.xls"
            DBMS=Excel REPLACE;
       RANGE="A3:G80";
       sheet="NEMA"
       getnames=yes;

RUN;

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: Dea Talu [mailto:deat...@hotmail.com]
Sent: Monday, December 29, 2003 1:17 PM
To: pcho...@DDS.CA.GOV
Subject: RE: Reading the data from the Internet

Hi Paul,

I tried, but I get a bunch of errors. Here is the log file:

60   FILENAME website HTTP
60 !
'http://www.iso-ne.com/settlement-resettlement/SMD_operating_reserves_...
y/
60 ! 200311_OR_Summary.xls';
61
62   data file;
63     infile website;
64     input;
65     file "excelfile.xls";
66     put _infile_;
67     run;

ERROR: Service httpd not found.
NOTE: The file "excelfile.xls" is:
      File Name=C:\Documents and Settings\arotaru\excelfile.xls,
      RECFM=V,LRECL=256

NOTE: 0 records were written to the file "excelfile.xls".
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.FILE may be incomplete.  When this step was
stopped
         there were 0 observations and 0 variables.
WARNING: Data set WORK.FILE was not replaced because this step was stopped.
NOTE: DATA statement used:
      real time           0.05 seconds
      cpu time            0.02 seconds

68
69   PROC IMPORT OUT= WORK.excelfile
70               DATAFILE= "200311_OR_Summary.xls"
71               DBMS=Excel REPLACE;
72        GETNAMES=Yes;
73   RUN;

ERROR 22-322: Expecting a name.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR: Import unsuccessful.  See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used:
      real time           0.63 seconds
      cpu time            0.24 seconds

I'll try a little bit more, maybe I can fix the problem. Thank you anyway!

Dea

>From: "Choate, Paul@DDS" <pcho...@DDS.CA.GOV>
>To: 'Dea Talu' <deat...@HOTMAIL.COM>, SA...@LISTSERV.UGA.EDU
>Subject: RE: Reading the data from the Internet
>Date: Mon, 29 Dec 2003 13:02:02 -0800

>Dea - Try something like this (untested)

>FILENAME website HTTP
>'http://website.com:80/dir/excelfile.xls';

>data file;
>   infile website;
>   input;
>   file "excelfile.xls";
>   put _infile_;
>   run;

>PROC IMPORT OUT= WORK.excelfile
>             DATAFILE= "excelfile.xls"
>             DBMS=Excel REPLACE;
>      GETNAMES=Yes;
>      DATAROW=2;
>RUN;

>Hth

>Paul Choate
>DDS Data Extraction
>(916) 654-2160

>-----Original Message-----
>From: Dea Talu [mailto:deat...@HOTMAIL.COM]
>Sent: Monday, December 29, 2003 12:34 PM
>To: SA...@LISTSERV.UGA.EDU
>Subject: Reading the data from the Internet

>Hi,

>I have to get some data periodicaly from a website. Right now the way I get
>the data into SAS is by copying and pasting the information in a document
>and then by importing the document. The data is in Excel format; moreover,
>there are multiple sheets under the same webpage. I was wondering if there
>is any way to import the data automatically. Thanks a lot!

>Dea

>_________________________________________________________________
>Expand your wine savvy - and get some great new recipes - at MSN Wine.
>http://wine.msn.com

_________________________________________________________________
Enjoy a special introductory offer for dial-up Internet access - limited
time only! http://join.msn.com/?page=dept/dialup


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google