03-23-2016 05:05 AM
The previous examples read every row then output every 5th.
Fine for a one-off run or a small sample.
This is more efficient technique which only reads every 5th row but it's slightly more code.
do i = 1 to rows by 5;
set a point=i nobs=rows;
03-23-2016 07:16 PM
And if you have SAS/STAT 13.1 or higher, you can use PROC SURVEYSELECT also to literally select every 5th observation (without any random component):
proc surveyselect data=a out=b method=sys(start=5) rate=0.2; run;