Is there a way to upload XPORT files from Internet website like NHANES website directly to an ODA folder?Of course, I can download it to my computer and hen upload it to ODA folder but that is probably not what I want to do. Any suggestions?
It looks like the url assigned is pointing to a starting page of cdc.
https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Laboratory&CycleBeginYear=2017
Correct url is a one like below.
https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/ALB_CR_J.XPT
Below is a program I used for researching proc http.
filename resp "/home/xxxxxx/cportout/ALB_CR_J.XPT";
proc http url='https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/ALB_CR_J.XPT'
method="GET" out=resp;
run;
*cport file name;
libname libref1 xport '/home/u1878840/cportout/ALB_CR_J.XPT';
libname target '/home/xxxxxx/target';
proc http might help.
filename resp "<folder_where_you_want_to_download_xpt_file>";
proc http url='<xpt-url>'
method="GET" out=resp;
run;
It looks like the url assigned is pointing to a starting page of cdc.
https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Laboratory&CycleBeginYear=2017
Correct url is a one like below.
https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/ALB_CR_J.XPT
Below is a program I used for researching proc http.
filename resp "/home/xxxxxx/cportout/ALB_CR_J.XPT";
proc http url='https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/ALB_CR_J.XPT'
method="GET" out=resp;
run;
*cport file name;
libname libref1 xport '/home/u1878840/cportout/ALB_CR_J.XPT';
libname target '/home/xxxxxx/target';
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.