You're on the right track.
data List_Trt1;
set List_Trt;
by name;
length value_concat $30; *or whatever is appropriate;
retain value_concat;
if first.name then value_concat=' ';
value_concat=catx(',',value_concat,value);
if last.name then output;
run;
First, you need retain so it keeps its value throughout. Second, you need to initialize it to blank on first.name
. Third, you need to output only on last.name
. I use CATX
because it is more appropriate to what you are doing, but your CATS
should be okay also.