The question is: what for?
4 million observations ain't really much, so you're better off processing them at once.
Nevertheless, here's a little example:
%macro splits(inlib=,inds=,outlib=,outds=,split=);
%local num_ds i;
proc sql noprint;
select ceil(nobs/&split) into :num_ds from dictionary.tables
where libname = "&inlib." and memname = "&inds.";
quit;
data
%do i = 1 %to &num_ds.;
&outlib..&outds.&i.
%end;
;
set &inlib..&inds.;
select (ceil(_n_/&split.));
%do i = 1 %to &num_ds.;
when (&i) output &outlib..&outds.&i.;
%end;
end;
run;
%mend;
%splits(inlib=SASHELP,inds=CARS,outlib=WORK,outds=C,split=100)