BookmarkSubscribeRSS Feed
Red1
Calcite | Level 5
0
 

I have a problem importing a file from a website where you need to be registered to launch the download of the csv file, here is my code :

filename foo url 'http://XXXX:8028/'
         USER='XXX' PASS='XXX' debug;

proc import file=foo 
out=bigdata_tel2 
dbms=csv 
replace;
delimiter=";";
getnames=no;
run;

The result is the html code of the page, I also tried that url :http://XXXX:8028/aaa.csv notice that the url doesn't change when I download the file.

Here is the website : 

2.PNG

It's my first time importing a file from a website, any help is welcome. Thanks

2 REPLIES 2
Ksharp
Super User

two options:

1) Check PROC HTTP documentation and see if it could pass username and pw.

2) Use the third side software cURL to download that CSV, and PROC IMPORT it .

Red1
Calcite | Level 5

Thanks for your answer, I tried that : 

filename resp TEMP;
proc http

     method="GET"
     url="http://XXX:8028"
     webusername="XXX"
     webpassword="XXX"
     out=resp;
     run;

proc import file=resp
out=bigdata_tel2 dbms=csv replace; delimiter=";"; getnames=no; run;
 

ty.png

But the result is the same.. . html code 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 371 views
  • 0 likes
  • 2 in conversation