Perry Christensen
Perry Christensen

Reputation: 1

sas proc http unknow host

filename rix "&input.\rix_eligible.xls";
proc http   method  =   "get" 
        url     =   "http://www.riksbank.se/Documents/Riksbanken/RIX/2014/Eligible%20assets.xls"
        out     =   rix;
run;

I try running this code and get an unknown host error in SAS.

Running the same code with a different url, to download another excel-spreadsheet works fine.

Can anyone tell me if they can download from this particular link and preferably give me a hint to what the problem is?

Upvotes: 0

Views: 1399

Answers (1)

vasja
vasja

Reputation: 4792

Could be you're behind corporate proxy server? Try options in PROC HTTP, e.g.

   proxyhost="proxyhost"
   proxyport=80

Could be %20 is 'eaten' by SAS macro processor, but in that case it rather would be some 404 error. Try inside the url with single quotes.

Could be you need proxy authentication:

proxyusername="your-user-name"
proxypassword="your-password"

I'll also try using curl tool (http://curl.haxx.se/docs/httpscripting.html) to help you find the problem.

Upvotes: 1

Related Questions