Hello, I have a dataset test which has 7000 variables. I have a task to find all the variables that have .B and .C in it. For example data test; input K1 K2 K3 K4 K5; cards; 1 0 .B 2 1 0 2 2 .C 0 2 1 1 1 0 ; run; The output should give me K3,K4 vars. I have tried creating an array and do loop as below data tmp1; set test; array formats[*] _all_; do i = 1 to dim(formats); if formats[i] in (.B,.C) ; end; run; The above code is giving me the observations that have .B and .C . Can anyone help me in directing the right way to get ONLY the list of variables that have .B and .C. Thanks.
... View more