I work with huge daatsets - more than 100,000 observations followed up for 20 years. In the process of merging datasets read in through macros, I have lost track of the number of observations.
Following code gives the number of observations in the dataset - dataname:
%put There are &num observations in dataset dataname.;
This is from the SAS samples.