position2 = 0; if R1uid2 = R2uid1, then position2 = 1; if R1uid2 = R2uid2, then position2 = 2; if R1uid2 = R2uid3, then position2 = 3; if R1uid2 = R2uid4, then position2 = 4; if R1uid2 = R2uid5, then position2 = 5; if R1uid2 = R2uid6, then position2 = 6; if R1uid2 = R2uid7, then position2 = 7; if R1uid2 = R2uid8, then position2 = 8; if R1uid2 = R2uid9, then position2 = 9; if R1uid2 = R2uid10, then position2 = 10; if R1uid2 = R2uid11, then position2 = 11; if R1uid2 = R2uid12, then position2 = 12; if R1uid2 = R2uid13, then position2 = 13; if R1uid2 = R2uid14, then position2 = 14;
Note that more experienced SAS programmers can use arrays to achieve the same result.