Something fancy
data have;
input (ColumnA ColumnB ) (:$20.);
cards4;
@1email 1232;0829
@2email 1232;0829;0938
@1email 0938;48294;2938
@4email 0829;0938;0384
;;;;
data _null_;
if _n_=1 then do;
dcl hash H () ;
h.definekey ("v") ;
h.definedata ("v","count") ;
h.definedone () ;
end;
set have end=z;
do _n_=1 to countw(columnb,';');
v=scan(columnb,_n_,';');
if h.find() ne 0 then count=1;
else count=sum(count,1);
h.replace();
end;
if z;
h.output(dataset:'want');
run;
... View more