BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm a newbie to the forum and a novice at SAS programming.

Problem:
All I need is to read in the html source code from any given website into SAS. My problem is connecting to the internet. I'm sure there is some way to do this. I currently only have release 8.02. Is that at problem? I've tried many different infiles but nothing is working.

If anyone out there could help that would be a great help. Thanks.

JPI
5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi:
This is not really a stored process question. You could look in the documentation for information about the URL or HTTP access method on the FILENAME statement. Several of these access methods are described in these links to papers and the doc: [pre]http://support.sas.com/software/91x/lrdictwhatsnew900.htm
http://www.bassettconsulting.com/P6-27-01.pdf
http://www2.sas.com/proceedings/sugi30/100-30.pdf
http://www2.sas.com/proceedings/sugi28/073-28.pdf
[/pre]
These papers talk about different reasons and methods to read HTML pages with SAS. However, being able to read "ANY" website into SAS sounds like a technique called "screen-scraping" that we used to use when we didn't want to recode CICS screens. So we ran a product to scrape the information from a CICS data entry screen or information screen and use it elsewhere in our program. (My dim memory of this is that it was an enormous pain to scrape the info and use the scraped info correctly.)

Your best bet might be to talk to Tech Support and explain to them exactly what you need to do and they can help you find the best method to accomplish your task.
cynthia
deleted_user
Not applicable
thanks.

where in this forum can I ask general questions about SAS programming.

jpi
Vince_SAS
Rhodochrosite | Level 12
SAS Institute does not have a forum for general SAS questions. If you would like to make suggestions for new forums, please send your comments to suggest@sas.com

There is a mailing list called "SAS-L" that is run by SAS customers. It is not affiliated in any way with SAS Institute.

You can find out more about SAS-L at:

http://www.listserv.uga.edu/archives/sas-l.html

Best regards,

Vince DelGobbo
SAS R&D
deleted_user
Not applicable
I sent an email to request more forum topics.
Here is the code that I use. It works but it takes 1-5 minutes for one URL. I would like to shorten the time so it can read the data in seconds.

How can I modify this code to shorten the time. Is there a faster way? Is it slow because we don't have enough bandwidth or is more of a problem with my code? Maybe it takes so long because of security barriers? What do the experts think. Thanks again.

JPI

CODE:
filename connect url
"http://www.whitepages.com:80/10001/search/FindPersonfirstname_begins_with=1&firstname=Jared&name=Pratt&city_zip=&state_id=UT" debug;

data test;
infile connect length=len;
input record $varying200. len;
run;
Vince_SAS
Rhodochrosite | Level 12
I ran a similar request to this server, and SAS reported that it took 1.06 seconds of real time. The problem may be network-related at your site.

Vince DelGobbo
SAS R&D

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1176 views
  • 0 likes
  • 3 in conversation