HI SAS friends, Am using SAS ver 9.4. Need your help and expertise setting up text searching and selection. There are two sample datasets below. The dataset COLORS, has the colors terms that need to be searched for. In the dataset HAVE, there are two columns (apples , heroes). Need to identify those rows in HAVE where one of the colors is mentioned at least once. Need to search the two columns, Apples and Heroes, for any instance of one of the colors. Some rows will be completely excluded. Some rows may have a color of interest mentioned more than once. I'd guess this involves Do Loops, probably one per column of interest (Apples, Heros), but beyond am not sure what to do next. Thanks for your suggestions, much appreciated. R data COLORS;
input color $10. ;
datalines ;
red
purple
green
blue
;
run;
data HAVE ;
input Apples $14. Heroes $20. ;
datalines ;
red delicious green hornet
sweet fuscia assain orange
gala red lavender lantern
green granny spidy red
sour grey assain purple
:
run ;
... View more