PING  0.9
Statistical data handling and processing in production environment
ds_change

Rename one or more datasets in the same SAS library.

%ds_change(olddsn, newdsn, lib=WORK);

Arguments

  • olddsn : (list of) old name(s) of reference dataset(s);
  • newdsn : (list of) new name(s); must be of the same length as olddsn;
  • lib : (option) name of the library where the dataset(s) is (are) stored; default: lib=WORK.

Note

In short, this macro runs:

PROC DATASETS lib=&lib;
%do i=1 %to %list_length(&olddsn);
CHANGE %scan(&olddsn,&i)=%scan(&newdsn,&i);
%end;
quit;

See also

%ds_rename, CHANGE.