PROC IMPORT OUT= WORK.ccs
DATAFILE= "F:\MySAS\cc.xls"
DBMS=EXCEL REPLACE;
SHEET="Sheet1$";
GETNAMES=YES;
MIXED=YES;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
data ccs_1;
set ccs;
retain tmpn tmpg;
if name^=. then tmpn=name;
else name=tmpn;
if group^=. then tmpg=group;
else group = tmpg;
drop tmpn tmpg;
run;
proc sort data=ccs_1;
by name group;
run;
data ccs_2;
merge ccs_1 (where=(time=1))
ccs_1 (where=(time=2) rename=(a=a1 b=b1 c=c1 d=d1 e=e1))
ccs_1 (where=(time=3) rename=(a=a2 b=b2 c=c2 d=d2 e=e2));
by name group;
drop time;
run;
proc print data=ccs_2; run;