程序没有错误,Max里没有记录是因为第二个data步里没有output语句。
我不知道你想干什么,猜想你是想求第一个数据集里con的最大值。所以我改了代码,你看看是你想要得吗?
[code:f41f4]data max(keep=max_con);
set raw nobs=nobs;
do obsnum=1 to nobs;
set raw point=obsnum;
if con>max then max=con;
if _error_ then abort;
end;
max_con=max;
output;
stop;
run;[/code:f41f4]