Moving SAS Libraries and SAS Data Sets

Moving Libraries

The COPY statement provides the MOVE option to move SAS data sets from the input library (either the procedure input library or the input library named with the IN= option) to the output library (named with the OUT= option). Note that with the MOVE option, SAS first copies the files to the output library, and then deletes them from the input library.
The following statements move all the data sets in the library PRECIP to the library CLIMATE:
   copy out=climate move;
run;
The following SAS log shows that the data sets in PRECIP were moved to CLIMATE:
Log 39.5 Moving Data Sets in the Library PRECIP to the Library CLIMATE
153 copy out=climate move; 154 run; NOTE: Moving PRECIP.RAIN to CLIMATE.RAIN ...

Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.