Я думаю, все, что вам нужно добавить, это ORDER = DATA to PRO C FREQ. У вас есть правильная идея с сортировкой по убыванию.
data genes3;
do A62=0,1;
do status2=0,1;
input f @;
output;
end;
end;
cards;
4 1 3 9
run;
proc sort data=genes3;
by descending A62 descending status2;
run;
proc print;
run;
Proc Freq data=genes3 order=data;
Tables A62*Status2;
weight f;
run;