Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS 9.1.2 - XML Libname to URL ? 1

Status
Not open for further replies.

Exie

Programmer
Sep 3, 2003
156
AU
Hi,

We've recently picked up SAS 9.1.2 to notch up our use of XML. However it appears that I cannot use a URL to reference my XML data.

Has anyone tried this ?

My Code looks a bit like this:
Code:
filename  ds '[URL unfurl="true"]http://username:passwd@server1/hel/ABCD.nsf/e9b7e790faded6da4a256ad8000093d1?ReadViewEntries';[/URL]
filename  SXLEMAP 'C:\Projects\XML2SAS\ds.map';
libname   ds xml xmlmap=SXLEMAP access=READONLY;

This produces the following error:
Code:
ERROR: Physical file does not exist, C:\Documents and Settings\username\[URL unfurl="true"]http://username:passwd@server1/hel/ABCD.nsf/e9b7e790faded6da4a256ad8000093d1?ReadViewEntries.[/URL]

The code works fine when I save the XML data as a local file, but using XML as "Web Services" is one of the biggest wins of using XML, surely SAS support this ?!

Any hints/tips would be greatly appreciated.
 
Ok, I figured out how to use a URL! :)

It's like so:
Code:
filename  ds URL '[URL unfurl="true"]http://server1/hel/ABCD.nsf/e9b7e790faded6da4a256ad8000093d1?ReadViewEntries';[/URL][code]

The catch I have now is, passing username/password credentials in the URL. It keep parsing the username/password as the Hostname. The error looks like:
[code]ERROR: Hostname <username> not found.
       encountered during XMLInput parsing
       occurred at or near line 1, column 1

Any thoughts ?
 
Hey! Solving my own problem here!

as per this SAS Article, you can supply USER= and PASS= as parameters to the filename statement.

This all works like a charm now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top