bravesimon 发表于 2015-3-18 08:59 
jl60156,真是高手啊, 多谢多谢了。不知道怎么把金币给你,是设为最佳答案就可以了吗?
想追问一 ...
just revise the previous code as the following
data want;
set have;
do i=1 to nobs;
set have(rename=(id=idh point=pointk seq=seqh)) nobs=nobs point=i;
if id<idh and id eq ceil(seqh/3) and seq eq ((mod(seqh,3)+(mod(seqh,3) eq 0)*3) +(idh-2)*3) then output;
end;
run;