proc sort data = FEEDBACK out=a;by CUSTOMER score comment;where comment ne '';run;
data b;
set a;by CUSTOMER score comment;
length com $200.;
retain com '';
if first.CUSTOMER then com=comment;
else com=strip(com)||"&"||strip(comment);
if last.CUSTOMER;
run;
data c;
set b;
if prxmatch('/parking/i', com) and prxmatch('/expensive/i', com);
run;
|