|
You may want to consider using FILE ... FILEVAR= for
this.
For 11 recs distributed 3-recs-to-a-file it could look
something like (tested):
data xx;
do x = 1 to 11; output; end;
run;
%let max_recs = 3;
data _null_;
fileno + 1;
filespec = 'd:\xx_sas\dum' || put(fileno, z3.);
file bedlam filevar = filespec;
do until (ct = &max_recs);
set xx;
ct = sum(ct, 1);
put x;
end;
run;
Hope this is helpful ...
Prost,
Puddin
*******************************************************
***** Puddin' Man **** Pudding_Man-at-mail.com ********
*******************************************************;
"I'm gonna leave heah' running
'cause walkin'd be Most Too Slow."
from "Key To The Highway", Wm. Broonzy, around 1939
----- Original Message -----
From: Daixin Yin <dx35y@YAHOO.COM>
Date: Thu, 18 Mar 2004 19:11:06 -0500
To: SAS-L@LISTSERV.UGA.EDU
Subject: Split one big output ASCII file to smaller files
I'm generating ASCII files from SAS datasets using DATA _NULL_; FILE ****;
PUT ...; The nubmer of observations in each SAS dataset range from 4000+ to
20000+. I want to restrict the number of observations of the output files
to no more than 2000, i.e. need to split one big output file to some
smaller files. How do I do that efficiently? I'm thinking of SET POINT=,
but not familiar with it.
Thanks in advance!
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
|