In reply to Christine.

If the dataset is very large, this could take some time since it is actually reading each observation (the data portion) of the dataset. The dictionary.tables SQL facility provides the number of observations by reading the descriptor portion of the dataset. There is a myth that it uses PROC FREQ to get the counts.

The only problem with the dictionary.tables or sashelp.vtable is that PROC SQL has to "discover" the datasets in each defined libname. However, their usefulness generally is worth it.