Proc SQL as Proc Contents

From sasCommunity

Jump to: navigation, search

Proc SQL as Proc Contents

This code writes the data structure to the log:

Proc SQL; describe table sashelp.Class;
          quit;

Q: How do I get a list of variables?

Proc SQL; describe table Dictionary.Columns;
          quit;

Q: How do I get a list of tables?

Proc SQL; describe table Dictionary.Tables;
          quit;

Compare the Contents output data set to the above:

Proc Contents data = sashelp._all_
                     noprint
              out  = Contents;
run;

Proc SQL; describe table Contents;
          quit;
Personal tools