Or you can try this: data have; input id x_v1 x_v2 x_v3 x_v4 x_v5 x_v6 x_v7 x_v8 x_v9 x_v10; cards; 1 . 1 0 1 0 1 0 1 0 1 2 0 . 1 0 0 . . 1 0 0 3 . 1 0 1 0 1 0 1 0 . ; data want (drop=_:); set have; length _t $50.; array old x_v1-x_v10; _t=catx(' ',of old(*)); _n=n(of old(*)); call missing(of old(*)); do _n_=1 to _n; old(_n_)=scan(_t,_n_); end; run; proc print;run; Haikuo
... View more