I took the example sashelp.class and developed the code as per your requirement.
Please check and update as per your data and test
data class;
set sashelp.class;
array grades(2)$ heightgrade weightgrade;
array result1(2) height weight;
array result2(2) height2 weight2;
do i = 1 to 2;
if result1(i) ne . then result2(i)=round(result1(i),1);
if result2(i)>90 then grades(i)='A';
else if 75<=result2(i)<=89 then grades(i)='B';
else if 60<=result2(i)<=74 then grades(i)='C';
else if .<result2(i)<60 then grades(i)='D';
end;
run;
... View more