12-28-2017 03:18 AM
Use the mod() function on the automatic variable _N_ in a subsetting if.
To get more information, do google searches on
SAS mod function
SAS _n_ variable
SAS subsetting if
12-28-2017 06:25 AM
To do this is easy. But to do it using a DO loop is not as easy, and not really a "beginner's" problem. For example:
do _n_=100 to _nobs_ by 100;
set have point=_n_ nobs=_nobs_;
Accomplishing this without a DO loop is relatively easy and a more appropriate problem:
if mod(_n_, 100) = 0;
Even so, most beginners would find this method challenging.