Ah ok. This gives you the final required output
data have;
length Column1 $200;
input Column1 $ group;
datalines;
Benefits,verify 1
claims,verify,benefits,verify 2
inquiry,type 3
claims,verify 4
Benefits,verify,inquiry,type,Benefits 5
Benefits 6
Benefits 7
;
data want(keep=Column1 Part_Of_Group count);
set have nobs=nobs;
count=0;
do _N_=1 to nobs;
set have(rename=(Column1=compColumn1 group=compGroup)) point=_N_;
if find(compColumn1, Column1, 'it') ne 0 & group ne compGroup & countw(Column1, ",")>1 then do;
Part_Of_Group=compGroup;
count+1;
output;
end;
end;
if count=0 & countw(Column1, ",")>1 then output;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.