I was wondering if anyone knows how to create a macro variable for all the members in a library. I'm wanting to sort 30 datasets by a common variable and are considering using %do loop function, however would like to save time in typing the member names out in full.
call execute() in a data step might help[pre] data _null_ ;
set sashelp.vtable( where=( libname='YOURLIB' ));
call execute( 'proc sort data=yourlib.' !! memname );
call execute(' out= work.'!! memname ' );
call execute(' ; by BYVAR ; run; ' );
I expect that solution is among those links Cynthia provided.