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';
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: