/* 1. Define LIBNAMEs for your folders */
LIBNAME source spde '/Temp/Alain/OP/dim/';
LIBNAME target spde '/Temp/Alain/OP/dim/old2/';
/* 2. Use PROC DATASETS to move the dataset */
PROC DATASETS LIBRARY=source;
COPY IN=source OUT=target MOVE; /* MOVE copies and deletes original */
SELECT dim_calendrier_v1 jourouvrableprovds jourouvrablenatds jourouvrableetdprovds jourouvrableetdnatds; /* Specify the dataset to move */
QUIT;
RUN;
/* 3. Verify the move (optional) */
proc contents data=source._all_ nods;
run; /* Check if it's gone from source */
proc contents data=target._all_ nods;
run; /* Check if it's there in target */
How to modify this script if all the tables has the same password (write=po alter=po)
Please provide a working example
PROC DATASETS LIBRARY=source;
COPY IN=source OUT=target MOVE alter = 'Mypassword'; /* MOVE copies and deletes original */
SELECT dim_calendrier_v1 jourouvrableprovds jourouvrablenatds jourouvrableetdprovds jourouvrableetdnatds; /* Specify the dataset to move */
QUIT;
RUN;
You need to provide the ALTER password on the MOVE option:
Here's the link to the SAS doc with the above COPY statement.
Please provide an example
PROC DATASETS LIBRARY=source;
COPY IN=source OUT=target MOVE alter = 'Mypassword'; /* MOVE copies and deletes original */
SELECT dim_calendrier_v1 jourouvrableprovds jourouvrablenatds jourouvrableetdprovds jourouvrableetdnatds; /* Specify the dataset to move */
QUIT;
RUN;
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.