SAS中文论坛

标题: SAS程序员测试(二) Try this one. [打印本页]

作者: shiyiming    时间: 2006-4-24 01:08
标题: SAS程序员测试(二) Try this one.
proc sort data=tem;
  by vol id date;
  run;

data test(drop=date);
  set tem;
  by vol id;
if first.id=1 then do;
    Bdate=date;
    retain id bdate vol;
    end;
if last.id then do;
   Edate=date;
   output;
   end;
format bdate edate yymmdd10.;
run;

proc sort data=test;
by id vol;
run;




欢迎光临 SAS中文论坛 (http://mysas.net/forum/) Powered by Discuz! X3.2