This post was kindly contributed by SAS & Statistics - go there to comment and to read the full post. |
*** Use a third variable to assign the value from the previous record;
array one a b c d;
array two e f g h;
      do over one;
            temp = lag(one);
            if first.id = 0 and last.id=1 and two = . then do;
                  two = temp;
            end;
      end;
This post was kindly contributed by SAS & Statistics - go there to comment and to read the full post. |