第一个问题
data t1-t11;
set balancesheet;
if period = '2001-12-31' then output t1;
if period = '2002-12-31' then output t2;
if period = '2003-12-31' then output t3;
if period = '2004-12-31' then output t4;
if period = '2005-12-31' then output t5;
if period = '2006-12-31' then output t6;
if period = '2007-12-31' then output t7;
if period = '2008-12-31' then output t8;
if period = '2009-12-31' then output t9;
if period = '2010-12-31' then output t10;
if period = '2011-12-31' then output t11;
run;
第二个问题,你的period应该是字符型,首先转换成日期型新变量date
data tmp;
set balancesheet;
date = input(period,yymmdd10.);
format date yymmdd10.;
if year(date)>2000 and year(date)<2011 then do;
if missing(asset) or missing(cash) then delete;
end;
run;