zzf159476 发表于 2016-3-5 10:04 
数值变量设为缺失
恩 谢谢了 还有个问题也想请你看一下。data work.Air1990_2000;
set sashelp.airline1990_2013(where=(month<='31Dec2000'd));
array seasons{*} mon1-mon11;
retain mon1-mon11 . time 0;
time+1;
if mon1=. then do i=1 to 11;
seasons
=0;
end;
if month(month)<12 then do;
seasons[month(month)]=1;
output;
seasons[month(month)]=0;
end;
else output;
drop i;
run; 这一段if语句实在看不懂 尤其是红色两行。 再次谢谢。