I have the following code: data a (drop=i); set b; array x{*} dx:; hf=0; do i=1 to dim(x); hf=ifn(substrn(x{i}, 1, 3) in('428', 'I43'),1,hf); end; run; data a (drop=i); set b; array x{*} dx:; hf=0; do i=1 to dim(x); hf=ifn(substrn(x{i}, 1, 4) in('d282', 'd432'),1,hf); end; run; Is there is a way to combine the two codes into one code given that I am requiring different lengths in the substrn statement, (For example 3 in the first and 4 in the second). I am looking to get a code that would be something similar to: hf=ifn(substrn(x{i}, 1, 3) in('428', 'I43'),1,hf) or hf=ifn(substrn(x{i}, 1, 4) in('d282', 'd432'),1,hf); Is it possible to have such statement? Thanks
... View more