zhangzachary 发表于 2012-3-11 09:28 
data out;
set test;
by class2 notsorted;
求指教!
如果我自己定义:
data g;
set test;
if _n_ eq 1 then do ;
m=class1;
n=class2;
output;
end;
if _n_ ne 1 and class1 ne m and compare(n,class2) ne 0 then do;
m=class1;
n=class2;
output;
end;
run;
那么,在第二次set的时候,也就是_n_=2的时候,pdv中的m,n是不是就丢失了?