/***************************************************************************************************************** SAS file name: Copy_Datasets.sas File location: _________________________________________________________________________________________________________________ Purpose: To demonstrate how to copy data sets between libraries with the Copy Procedure in SAS Author: Peter Clemmensen Creation Date: 12/06/2017 This program supports the example page "Copy Dataset From One Library to Another in SAS" on SASnrd.com *****************************************************************************************************************/ /* Assign demonstration library */ libname MyLib "c:\Users\Peter\Documents\"; /* Copy selected data sets from one library to another with PROC COPY */ proc copy in=sashelp out=work memtype=data; select class; run; /* Copy all data sets in a library to another with PROC COPY */ proc copy in=sashelp out=work memtype=data; run; /* Copy specific data set from WORK to MyLib and delete original */ proc datasets nolist; copy in=work out=MyLib memtype=data move; select class; run;quit; /* Copy all data sets in WORK to MyLib and delete originals */ proc datasets nolist; copy in=work out=MyLib memtype=data move; run;quit;