*---Get information about all data sets in a library;

 

libname test 'c:\...\sasdata' ;

 

%macro getname( lib );

  options ls = 120 ps =60 ;

  proc sql;

    select memname,

           memlabel,

           typemem,

           crdate,

           modate,

           nobs,

           nvar

        from sashelp.vtable

        where libname = %upcase("&lib")

          and memtype = 'DATA';

  quit;

%mend getname;

 

*--Run macro;

%getname( test ) ;