Hi ... another approach (I should really learn more about IML !!!), the rolling 24-month window you mentioned in your comment (but no PROC FREQ) ...

data _null_;
array x(120) _temporary_;
array z(24) _temporary_;
do until(done);
set events end=done;
x(y) + 1;
end;
do j=1 to 120;
z(mod(j,24)+1) = x(j);
maxy = max(of maxy, sum(of z(*),0));
end;
put maxy=;
run;