*--Stored in /pub/sas/allsets.sas--; *--Sample of code (posted to SAS-L by Ian Whitlock) to access all datasets in a SAS data lib and capture the results in a "code loop" store in a macro var. Has lots of variations, applications -- this code to be used as a template. E.g. change "proc print" to "proc univariate" and add a filter on memname to the where clause. jgb, 4-99. --; proc sql ; select "proc print data = " ||libname||'.'||memname||"(obs=10);run;" into :listem separated by " " from dictionary.tables where libname = "WORK" ; quit ; &listem ;