data one;
input id weight time;
cards;
1 5 2
2 3 4
;
run;
data two(drop=weight rename=(new_weight=weight));
set one;
do until (weight<1);
id=id;
time=time;
weight=weight-1;
new_weight=1;
output;
end;
run;
s*******e 发帖数: 1385
3
thanks,5个包子答谢
【在 d*******o 的大作中提到】 : data one; : input id weight time; : cards; : 1 5 2 : 2 3 4 : ; : run; : data two(drop=weight rename=(new_weight=weight)); : set one; : do until (weight<1);