|
Deng, Yue wrote:
> Hi everyone,
> If I want to sort ALL datasets in the library "A" what shall I do?
It depends.
Do all the tables have the same columns ?
Which column(s) do you want to sort the tables by ?
- per column name ?
e.g. BY a b c;
- per column position ?
e.g. BY {1st column} {3rd column} {2nd column}
Do you really need to sort each table ?
Would a sorted view work instead ?
--- Here is a push start ---
data _null_;
set sashelp.vtable;
where libname = 'A'
and memtype = 'DATA'
;
call execute ('PROC SORT DATA=A.'||memname||';BY patientId;RUN;');
run;
---
Richard A. DeVenezia
http://www.devenezia.com
|