Hello Experts,
You know that in web, there is the request (the client's request -> server) and the response (server -> client's browser). The response from http://XXXXXX is a file stream type txt (generated with php).
So physical file doesn't exist, while clicking on http://XXXXXX
I'm wondering if there is possible to import this kind of file ?
Thank you for helping !
If you use SAS 9.4(M3 and later), you can use proc http.
Try this code.
filename webdoc 'c:/temp/want.txt' encoding='utf-8';
proc http
method="get"
url="https://www.google.com/"
out=webdoc;
run;
data test;
infile webdoc;
attrib buf length=$4096;
input buf $4096.;
put buf=;
run;
you can get 'c:/temp/want.txt' as a text file, and 'WORK.TEST' as a dataset.
If you use SAS 9.4(M3 and later), you can use proc http.
Try this code.
filename webdoc 'c:/temp/want.txt' encoding='utf-8';
proc http
method="get"
url="https://www.google.com/"
out=webdoc;
run;
data test;
infile webdoc;
attrib buf length=$4096;
input buf $4096.;
put buf=;
run;
you can get 'c:/temp/want.txt' as a text file, and 'WORK.TEST' as a dataset.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.