PROC COPY cannot copy to the same directory, it has no rename functionality. To do a copy in the same library, use a data step together with the index= data set option. One drawback of this method is that you have to re-define your index definition.
A little more "crazy" solution is to use concatenated librefs (for your ordinary use). But your copy job will use it a two seperate librefs:
libname LibA './DirA';
libname LibB './DirB';
data Liba.dsa(index=(vara));
VarA=5;
run;
proc datasets lib=LibB nolist;
delete dsb;
quit;
proc datasets lib=LibA nolist;
copy out=LibB;
select dsa;
quit;
proc datasets lib=LibB nolist;
change dsa=dsb;
quit;
libname LibAB ('./DirA,'./DirB);
/* List contents of concatenated library */
proc datasets lib=LibAB;
quit;
/Linus
Data never sleeps