Below is a collection of Proc Contents SAS papers. While Proc Contents is generally used for displaying the dataset structure and vairable attributes, it can also be used as metadata for more intelligent processing. Along with NOBS, below are other useful Proc Contents variables. See Dictionary tables.
proc contents data=sashelp.class out=class_metadata; run;