*I used %nrstr to simplify the following check and it worked. I checked here if the tree_types falls under any of the following: '999', '888', '777', '444', '555', '666', '124', '543', '567', '987', '342', '123', '678', '876', '123', '432', '657', '453', '125', '665', '776', '887', '567'. If it falls under any of these types then it is flagged as '1'.; %let tree = %nrstr ('999', '888', '777', '444', '555', '666', '124', '543', '567', '987', '342', '123', '678', '876', '123', '432', '657', '453', '125', '665', '776', '887', '567'); data want; set have; if tree_type in (&tree) then tree_type=1; run; proc print data=want; where tree_type in (1); var id; run; *Now I am thinking what is the alternative if I want to check many strings in one check like this. Such as in place of ('999', '888', '777', '444', '555', '666', '124', '543', '567', '987', '342', '123', '678', '876', '123', '432', '657', '453', '125', '665', '776', '887', '567') there will be strings such as ('sbc', 'THe end', 'dfi', 'gas', 'Grt'...etc.) some strings are upper case, some are lower case, some are both upper and lower case, some has more than one word. Any suggestion would be appreciated. Thank you.
... View more