Hi, I have multiple subst statements and I want to run them all at once. Can some one help on the best way to combine all these statements in once (I have 30+ statements) data a (drop=i); set b; array {x} dx:; ar=1=0; do i=1 to dim(x); if substrn(x{i}, 1, 5) in ('12345', '23456', '30987') then do; ar=1; leave; end; end; run; data a (drop=i); set b; array {x} dx:; arf=1=0; do i=1 to dim(x); if substrn(x{i}, 1, 4) in ('1234', '2432', '3987') then do; arf=1; leave; end; end; run; data a (drop=i); set b; array {x} dx:; ad=1=0; do i=1 to dim(x); if substrn(x{i}, 1, 2) in ('12', '24', '39') then do; ad=1; leave; end; end; run;
... View more