@Kurt_Bremser
Trying to use Kurt's solution posted above
data mydata;
input id:$1. include:$1. exclude:$3.;
datalines;
a . abc
a . xyz
b j abf
b . gtj
;
run;
data newdata;
set mydata;
retain myinclude concat ;
by id;
length myinclude $10.;
length concat $10.;
if first.id then myinclude = "";
if first.id then concat = "";
myinclude = catx('',myinclude,include);
concat = catx(',',concat,exclude);
if last.id then output;
drop include exclude;
run;
I can make
The SAS System
id
myinclude
concat
a
abc,xyz
b
j
abf,gtj
... View more