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;
1. Control With PROC CONTENTS, Gary McQuown
2. Discontented with PROC CONTENTS? Expand it with FMTLIB, Irene Mendelson
3. Developing Data-Driven SAS Programs Using Proc Contents, Robert W. Graebner