Hi Scott.
Thank you for responding. Yes, you caught an error in my transcription. I actually did use "change" rather than "rename" in my code, and I didn't get an error message; the move and rename (well, change) worked perfectly, but it didn't preserve the date of the original file, which is what I'd like to do, if possible. So the correct move and rename code is:
proc datasets nolist library=lib2;
copy in=lib1 out=lib2 move datecopy;
select ds1;
change ds1=ds2;
run;
but the datecopy option, which is described as follows in the online doc:
"copies the SAS internal date and time when the SAS file was created and the date and time when it was last modified to the resulting copy of the file. Note that the operating environment date and time are not preserved."
appears to have no effect. I think that last sentence in the description is an admission that the datecopy option isn't designed to do what I wanted. But then I don't even understand what it's good for. There is a remark in the doc that the date can be manually altered using the DTC= option on the MODIFY statement, so maybe I have to see if I can capture the original date info and then reassign it after the move. Honestly, that seems unnecessarily complicated to me, but I'll see if I can get it to work.
-- TMK --