Perhaps, borrowing from @Tom
The first data step is just to build something similar to what you describe as your data.
The data set TEMP is code you would run against that data set to get the value list. Depending on the actual lengths of your values the length of the list variable may need to be much larger. This sort of thing is not normally built by point and click interfaces because it is a non-standard action and makes data that is often much harder to work with for some tasks.
Then the last step combines the two data sets.
data have;
input a b $;
cards;
1 A
1 B
1 C
2 A
2 B
;
data temp;
length a 8 b_list $20 ;
do until(last.a);
set have;
by a;
b_list=catx(',',b_list,b);
end;
drop b;
run;
data want;
merge have
temp
;
by a;
run;
Still want to know what you expect to do with the combined values, especially when they are repeated.
... View more