When working with data, programmers may sometimes want to rename existing datasets.
Some programmers create new datasets with the required names by reading the existing datasets, using an approach similar to the one shown below.
data males;
set a1;
run;
data females;
set a2;
run;
The above approach may be fine for smaller datasets but becomes very inefficient when working with large datasets. The efficient way is to make use of change statement of proc datasets.
proc datasets library=work nolist;
change a1=males a2=females;
run;
run;