data have;
input string $;
cards;
1
-1-3
456
-6-7-8
;
run;
data temp;
set have;
id+1;
temp=prxchange('s/(-?\d)/ \1 /',-1,string);
do i=1 to countw(temp,' ');
value=scan(temp,i,' ');output;
end;
keep id value;
run;
proc transpose data=temp out=want;
by id;
var value;
run;
... View more