I thought WHICHN function might be useful. But I probably don't understand the problem. data have; input id RX_1-RX_3 (Start_1-Start_3)(:mmddyy.); array rx rx_:; array s start_:; array new[3]; do i = 1 to dim(rx); new = s[whichN(rx,of rx )]; end; format start_: new: mmddyy.; drop i; cards; 1 1 2 2 01/20/05 01/29/05 1/30/05 2 1 2 3 01/20/05 01/20/05 1/21/05 ;;;; run; proc print; run;
... View more