popodan 发表于 2017-6-19 12:14 
累加也是一样的啊,如果variable为空,结果也是空的。
data a;
input a;
但是累加情况下,像95题的No80这道题,就没有ignore missing value,觉得很奇怪~
80. Assume ecsql1.employee_donations has 6 observations,
and qtr1 has 6 values listed below:
100
200
300
.
150
50
What is the value of donation_tot after the 5th DATA step iteration?
data work.donations;
set ecsql1.employee_donations (drop=qtr2-qtr4);
retain donation_tot 1000;
donation_tot + qtr1;
run;
a) 0
b) 750
c) 1750
d) Data step fails due to errors
Answer: C
----------------------
这里答案选择C,是1000+100+200+300+150算出来的。
之前在123题某道题的解析也是看到说累加相当于sum语句,不管missing value,所以觉得有跟米粮包有点出入。