Things under legendu
**
Things under legendu
/* copy data using the datasets procedure */
proc datasets;
copy in=src_lib out=des_lib index=yes;
select data_set_1 data_set_2;
quit;
/* copy data using the copy procedure */
proc copy in=source out=xptout memtype=data;
select bonus budget salary;
run;
/* copy using a data step */
data copy;
set raw;
run;
/* copy data using a SQL procedure */
proc sql;
create table t as
select * from s;
quit;
/* copying directly using command line */
x cp src_file des_file;datasets and copy are essentially the same
datasets and copy can copy the index as well
generally speaking, the datasets procedure is preferred actually datasets is recommended for not only copying but also deleting, renaming datasets, etc.