Hello
This code rename data set A (in library Work) to data set B (in library work).
I want to rename data set A (in data set work) into data set B in library RRR.
What is the way to do it please?
proc datasets library=WORK;
change A=B;
run;
Data step.
Renaming might only work if
Make sure that options (COMPRESS!) are replicated.
You can't. Renaming a file works if the file doesn't move (I know @Kurt_Bremser, the mv command thinks otherwise :).
Here the data set is going to a different library, so you must move (or copy) it, not rename it.
Can you show the full code please with PROC COPY that rename data set work.A into data set RRR.A ?
I will not insult your intelligence by spoon-feeding you this very-easy-to-use procedure.
Just find your way from the documentation.
If you run into an unsolvable problem, post your log.
It's not a rename, it's not a move, it's a copy. Once you do this, you now have two exact identical copies of the data set, one in library WORK and one in library RRR. The documentation is here.
proc copy in=work out=rrr;
select a;
run;
quit;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.