[code:3o1kcmqo]data a;
input a;
cards;
1
.
.
.
2
3
3
.
3
.
4
.
.
;
data c;
set a ;
retain b;
if a>. then b=a;
run;
data d;
set a;
n=_n_;
if missing(a) then do;
do until (not missing(a));
n=n-1;
set a(keep=a) point=n; *second SET statement;
end;
end;
run;
data e;
do until(last.a);
set a;
by a notsorted;
if last.a and not missing(a) then do;
b = a;
end;
if missing(a) then do;
a=b;
end;
output;
end;
run;
[/code:3o1kcmqo]
<!-- m --><a class="postlink" href="http://communities.sas.com/message/37471">http://communities.sas.com/message/37471</a><!-- m -->
data a;
input a;
cards;
1
.
.
.
2
3
3
.
3
.
4
.
.
;
data c(drop=b impute);
set a ;
retain b;
if a>. then b=a;
if missing(a) and not missing(b) then do;
impute=1;
a=b;
end;
run;