/ Published in: SAS
URL: http://studysas.blogspot.com/2008/08/finding-number-of-observations-in-sas.html
There are a number of ways of finding out the number of observations in a SAS data set and, while they are documented in a number of different places, I have decided to collect them together in one place. At the very least, it means that I can find them again.
Read more at: http://studysas.blogspot.com/2008/08/finding-number-of-observations-in-sas.html
Expand |
Embed | Plain Text
First up is the most basic and least efficient method: read the whole data set and increment a counter a pick up its last value. The END option allows you to find the last value of count without recourse to FIRST.x/LAST.x logic. data _null_; set test end=eof; count+1; if eof then call symput("nobs",count); run; read more about 5 more diff ways to find number of observation in a dataset.... : http://studysas.blogspot.com/2008/08/finding-number-of-observations-in-sas.html
Comments
Subscribe to comments
You need to login to post a comment.

Read more at:
http://studysas.blogspot.com/2008/08/finding-number-of-observations-in-sas.html