Hello,
data have;
infile cards delimiter='|';
input V1 $ V2 $;
cards;
|a1
a1, b1 |a1
b2, b3, c6 |b2
c4, b2 |b2
BO |a1
;
run;
data want;
set have;
Match = (INDEX(trim(left(upcase(V1))), trim(left(upcase(V2)))) gt 0);
run;
/* end of program */
Most functions have modifiers as optional additional arguments to make the function case insensitive, get rid of leading and/or trailing blanks in the comparison and so on. I haven't checked in the doc if this is the case for the INDEX function so I do trim(left(upcase())).
Cheers,
Koen
... View more