Hello. i have merged three data sets, each of which were imported from a windows desktop C:location using the INFILE statement. How do i export this new (merged) single data set back to the desktop? Thank you!
1. Assign a library to the location you'd like the data set to be stored. To assign a library, use the LIBNAME statement to map a libname alias to the desired path on your local PC.
2. Use PROC datasets to move the data set. Or another data step.
Libname outloc '/folders/myfolders/samples/';
proc datasets library=work;
copy in=work out=outloc;
select dataset_save;
run;quit;
/* Or this, to copy WORK data to a permanent folder */
data outloc.dataset_save;
set work.dataset_save;
run;
1. Assign a library to the location you'd like the data set to be stored. To assign a library, use the LIBNAME statement to map a libname alias to the desired path on your local PC.
2. Use PROC datasets to move the data set. Or another data step.
Libname outloc '/folders/myfolders/samples/';
proc datasets library=work;
copy in=work out=outloc;
select dataset_save;
run;quit;
/* Or this, to copy WORK data to a permanent folder */
data outloc.dataset_save;
set work.dataset_save;
run;
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!
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.