You should be querying the Dictionary table for this instead. Your macro doesn't make sense as well, because it will always replace the table NACO so you'll only have the last iteration. You can customize the where clause to get info on only the datasets your interested in. proc sql; create table want as select libname, memname, nobs, nvar, nlobs from dictionary.tables where libname='NACO' and memname like "NACO_%"; quit;
... View more