For me, I used data-driven code to split a table into several groups which has a special ratio.
e.x. the following divide the SASHELP.AIR into 5 groups which has the equal size.
note: the ratio in it can change dynamically ,as long as their sum equal 1.

data have;
set sashelp.air;
run;

%let dsid=%sysfunc(open(have));
%let nobs=%sysfunc(attrn(&dsid,nlobs));
%let dsid=%sysfunc(close(&dsid));

data group;
input ratio;
retain start 1;
cum_ratio+ratio;
end=int(cum_ratio*&nobs);
group+1;
do i=start to end;
output;
end;
start=end+1;
keep group;
cards;
0.2
0.2
0.2
0.2
0.2
;
run;

data want;
merge group have;
run;
proc freq data=want;
table group;
run;