data aa1;
informat rq yymmdd10.;
format rq yymmdd10.;
input rq xh;
cards;
2005-01-04 1
2005-01-05 2
2005-01-06 3
2005-01-07 4
2005-01-10 5
2005-01-11 6
2005-01-12 7
2005-01-13 8
2005-01-14 9
2005-01-17 10
;
run;
%macro split(dsn,m);
data _null_;
set &dsn end=a;
if a<&m. and a>0  then call symput('total',ceil(_n_/&m.));
run;
%do i=0 %to &total;
data out&i;
set &dsn;
if (_n_>&m.*&i and _n_<=&m.*(&i+1)) then output out&i;
%end;
%mend;
%split(aa1,3);