data have;
input Test Grades$;
cards;
1 A
1 B
1 B
1 A
1 C
1 B
1 A
1 C
1 B
1 A
;
data x;
input Grades $;
cards;
A
B
C
D
;
run;
data temp;
set have(in=ina) x;
w=ina;
run;
proc freq data=temp noprint;
table test*Grades/list out=want(where=(test is not missing)) ;
weight w/zeros;
run;
... View more