|
|
地板

楼主 |
发表于 2010-9-2 15:26:44
|
只看该作者
Re: 一个data step的问题
[code:3qsp56ko]data b(drop=temp i);
length temp $200;
do _n_=1 by 1 until(last.class);
set a;
by class;
if lag(n)=0 and n ne 0 then temp=catx(',',temp,put(n,best.));
end;
i=1;
do _n_=1 to _n_;
set a;
if lag(n)=0 and n ne 0 then i+1;
n=ifn(n,n,input(scan(temp,i),best.));
output;
end;
run;[/code:3qsp56ko] |
|