OldTimer is right. Unquoting is sometimes hit and miss.
The only way I could make this work is by using
proc sql noprint;
select distinct trim(&attrib) into :&attrib._1 - :&attrib._4 from test;
quit;
and then
%unquote(&lefty.ratio_&&&attrib._1&lefty.n)=N/195;
I am unsure why you'd want to carry these hideous names in the data step instead of calling the new variables INFO1-4 and RATIO1-4 though.
This would also allow you to write
RATIO[CLASS_N]=N/195;
instead of doing successive tests.