data have;
input date : yymmdd10.;
format date yymmdd10.;
n1=date-"15Aug2008"d;
n2=date-"10Oct2008"d;
obs=_n_;
cards;
2008-6-27
2008-7-30
2008-8-5
2008-8-27
2008-9-2
2008-9-17
2008-10-10
2009-1-29
2009-2-24
2009-3-13
2009-3-26
2009-4-2
2009-6-5
;
proc sql noprint;
select distinct obs into :v1 from have where n1=(select min(n1) from have where n1>=0);
select distinct obs into :v2 from have where n2=(select min(n2) from have where n2>=0);
quit;
data wanted;
set have;
n1=obs-&v1;
n2=obs-&v2;
drop obs;
run;


雷达卡




京公网安备 11010802022788号







