BookmarkSubscribeRSS Feed
crimbo
Fluorite | Level 6

I have a macro to scrap tweets on Twitter and return details of the tweet in columns.  The macro is using PROC HTTP.  When i run the macro i get the following error messages:

 

ERROR: Host name resolution failed

ERROR: Host name resolution failed

 

Does this mean i am failing to access the Twitter page through their API?

 

Does SAS University Edition able to write and read JSON files?

 

Regards.

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You would need to provide some code, how are you connecting, are you providing correct login details etc.  Proc http requires correct signin details, and connection.  You might want to set it up in conjunction with your IT group, and make sure passwords and such like are encrypted.

 

SAS UE is principally a learning edition, it doesn't have full functionality either, and as its installed on Linu image rather than your local machine this could also be a problem.

 

As for Json, there is no out of the box reader as far as I am aware.  However, it is plain text, so should be pretty easy to read in and parse, however as you are using a learning edition of SAS it sounds like your learning, so maybe not the best task to start with.

 

And the phrase is "scrape" the data, although I would quite happily scrap social media!

crimbo
Fluorite | Level 6

Thank you very much for your response, most appreciated.

 

Please find attached the macro.

 

Regards.

crimbo
Fluorite | Level 6

Further to my last post, i managed to find a solution with a simple code in R.  Once again thank you very much for your input

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 1217 views
  • 0 likes
  • 2 in conversation