Imasasor 发表于 2013-1-22 14:20 
哦,是的,那你做一个宏循环吧. 那样就可以了
非常感谢!
我试了一下,写了下面这一段
proc optmodel;
number m=&color_num.;
number color_ratio{c in 1..m};
%macro readdata;
%do i=1 %to &color_num.;
color_ratio[&i.]="&&color_ratio&i.";
%end;
%mend;
%readdata;
quit;
不过还是报之前的那种错:
ERROR 575-782: The expression type, a string, does not match target, a number.