DATA Step, Macro, Functions and more

Reading REST results with SAS

Reply
New Contributor
Posts: 3

Reading REST results with SAS

Hello all,

I have done some research and discovered that SAS can interact with SOAP-based XML WEB Services, however I am looking at developing a REST-based architecture. We want to be able to read a string that is returned by visiting a URL into a SAS dataset and then using that string to determine what data to download.

I asked this question in a separate post and the response was to use FILENAME URL to read from the link. I tried this but it seemed unreliable in that it only worked for my test string if the record length was set to <= record length and the record format was fixed. Varying length records didn't seem to work.



What I'm wondering is if anyone else has tried to utilise a REST architecture with SAS and what has their experience been? I would also like to know how to process XML data received from a REST request?
Super Contributor
Super Contributor
Posts: 3,174

Re: Reading REST results with SAS

Due to some known limitations with the discussion forum software, your post was truncated. Suggest you re-post as a reply here and provide SAS code and SASLOG excerpts, where the results observed are not what you expect, when using a SAS DATA step and the FILENAME URL engine.

Scott Barry
SBBWorks, Inc.
New Contributor
Posts: 3

Re: Reading REST results with SAS

Thanks Scott. I did not know about the limit on post length

My examples are at work and I'm at home today so I will post them on Monday
SAS Employee
Posts: 5

Re: Reading REST results with SAS

You might try looking at proc http which is new in 9.2 Phase 2.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a003286796.htm
SAS Employee
Posts: 224

Re: Reading REST results with SAS

I checked your post (being the Admin let's me do these things). The problem isn't lenght. It is the fact that you used the less than + equals together. It was seen as an HTML tag. Try encoding using &lt;. It will look like < =
Ask a Question
Discussion stats
  • 4 replies
  • 169 views
  • 0 likes
  • 4 in conversation