我的问题如下
data have;
input id $ num;
datalines;
a 1
a 2
c 1
c 2
;
run;
data want_a want_b want_c;
set have;
if id EQ 'a' then output want_a;
else if id EQ 'b' then output want_b;
else if id EQ 'c' then output want_c;
run;
在上面第二个data步中,如果没有符合条件的观测,如id为b的情形,我就不想最后生成该数据集
请问该如何做到?谢谢!