LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 19 Jan 2009 19:09:15 -0500
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: Reading Web Pages using SAS
Comments: To: Charles Patridge <charles_s_patridge@PRODIGY.NET>

Charles,

I wasn't able to figure out how to totally get around their search strings, but the address shown after clicking on the following will reduce your task to only having to run 26 searches.

http://xrl.us/bec3tq

While it will wrap in this post, the actual string reads:

http://www.osha.gov/pls/imis/AccidentSearch.search? p_logger=1&acc_description=&acc_Abstract=&acc_keyword=a*&sic=&Office=All&of ficetype=All&endmonth=01&endday=19&endyear=2004&startmonth=01&startday=19&s tartyear=2009&p_show=20000&InspNr=

On the second line, above, the statement "&acc_keyword=a*" would have to be changed to account for keywords b* thru z*. Also, if you get 20000 records in any search, you would have to change the "&p_show=20000" toward the end of the search string. The four lines, though, represent a single string.

HTH, Art ------- On Mon, 19 Jan 2009 17:10:27 -0500, Charles Patridge <charles_s_patridge@PRODIGY.NET> wrote:

>Hi SAS-Lers, > >I have written a SAS program to read a specific web page based upon an >accident number which I get from an excel sxcel spreadsheet of a list of >accident numbers I copied from the same web site. > >http://www.osha.gov/pls/imis/accidentsearch.html > >What I would like to do is read ALL the accident numbers from a list of >web pages this web site provides. However, it only lists 20 items per >page. I was wondering how I could get SAS to read the 20 numbers, and >then go to the next page and read the next 20 numbers, and etc etc . > >Has anyone done this using SAS, and if so, how? > >I would appreciate a little help on this one. Otherwise, I will resort >the brute force way of continuing to copy these numbers into a spreadsheet >20 numbers at a time. > >Thanks in advance, > >Charles Patridge - please email me at my email address - >charles_s_patridge AT prodigy dot net


Back to: Top of message | Previous page | Main SAS-L page