|
DATA A;
INPUT id time1 b1 $ time2 b2 $ time3 b3 $ time4 b4 $ time5 b5 $ @@;
mm=ifn(findc(cats(b5,b4,b3,b2,b1),'A')>0,6-findc(cats(b5,b4,b3,b2,b1),'A'),0);
CARDS;
101.00 1.00 A 2.00 A 3.00 A 4.00 B 5.00 B
102.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 B
103.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
104.00 1.00 A 2.00 B 3.00 B 4.00 B 5.00 B
105.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
106.00 1.00 B 2.00 B 3.00 B 4.00 B 5.00 B
107.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
108.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
109.00 1.00 A 2.00 B 3.00 B 4.00 B 5.00 B
110.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
111.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 B
112.00 1.00 B 2.00 B 3.00 B 4.00 B 5.00 B
113.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
114.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
115.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
116.00 1.00 B 2.00 B 3.00 B 4.00 B 5.00 B
117.00 1.00 A 2.00 A 3.00 A 4.00 A 5.00 A
118.00 1.00 A 2.00 A 3.00 A 4.00 B 5.00 B
;
RUN; |
|