xiaosanmao 发表于 2010-1-30 14:47 
抄袭一下
data t1;
retain y ;
infile cards;
input;
n=length(_infile_) - length(compress(_infile_,'&'));
do i = 1 to n;
x=compress(catt(y,scan(_infile_,i,'&'),'&'),.);
output;
end;
y=scan(_infile_,n+1,'&');
cards;
1232&12
dasf&
fdas1&asdf1&
;
proc print; run;
Change
retain y ; -----> retain y ' ';
There is an important point here.