It is a good and efficient practice to use proc datasets to rename variables, since this will just modify the header portion of the dataset.
Sometimes, however, the data set options can be quite handy as well.
[pre]
/* test data */
data one;
x=1; y=1; var1=1; output;
x=2; y=3; var1=2; output;
x=3; y=2; var1=3; output;
run;
/* separate and rename */
data two(rename=(var1=newvar1))
three(rename=(var1=newvar2));
set one;
if x=y then output two;
else output three;
run;
/* check */
proc print data=two;
run;
proc print data=three;
run;
/* on lst
Obs x y newvar1
1 1 1 1
Obs x y newvar2
1 2 3 2
2 3 2 3
*/
[/pre]