You can transfer the components of the cell into a hash object with the "ordered" attribute. Then iterate through them and concatenate each of them:
data have;
input col1 col2 :$50. ;
cards;
1 1,5,4,3,2,6,3.5
2 21,3,2,1,5,15,17,3
3 1,2,3
4 4,3,2
5 1,2,junk,3
;
data want (drop=i _:);
set have;
if _n_=1 then do;
declare hash h (ordered:'A',multidata:'Y');
h.definekey('_x');
h.definedata('_x');
h.definedone();
declare hiter hi ('h');
end;
do i=1 to countw(col2,',');
_x=input(scan(col2,i,','),best12.);
if _x^=. then h.add();
end;
length new_col $50;
do while (hi.next()=0);
new_col=catx(',',new_col,_x);
end;
h.clear();
run;
... View more