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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 463 views
  • 0 likes
  • 2 in conversation