Hi, In my "HAVE" dataset, if "var1" is not in the string "not_in", I'd like to tag it as "Y", as in the the "WANT" dataset.
I need help to produce my "WANT" dataset.
data have; input var1 $ not_in $; cards; A A,B,C D A,B,C E B,D,A ; run;
Thus, for the first row, since A is in A,B,C, then I'd like its not_in_flg to be "N".
For the second row, since D is not in A,B,C, then is not_in_flg is to be "Y".
data want; input var1 $ not_in $ not_in_flg $; cards; A A,B,C N D A,B,C Y E B,D,A N ; run;
... View more