Rename your datasets all with the same prefix, like DS1, DS2...DS10.
%macro sortit;
%do i = 1 to 10;
proc sort data=ds&i;
by var1 var2...;
run;
%end;
%mend
%sortit;
2025 SAS Hackathon: There is still time!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!