From: Jane Folske [mailto:janecynthia@HOTMAIL.COM]
> I have a very large SAS dataset containing one million observations.
> These observations are simulated data in random order.
> I need to write out 1,000 flat ASCII text files of 1,000 observations
ah, Peter beat me to it,
but here's an alternate view of the code, anyway.
examine the file options filename = and filevar
%LET PATH = C:\TEMP;
filename PRNTFILE "&PATH.";
length FileVar $ 200;
retain FileVar "&PATH."
end = EndoFile;
Obs+1;%*count the obs;
%*increment the FileNmbr every 1000 obs;
if not mod(Obs,1000) then FileN +1;
filevar = FileVar
FileVar = "&PATH.\FILE"
!! put(FileN,z4.) %*pad FileNmbr with leading zeros;
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
OpSys: Win_Pro Ver: 8.2
--> cheerful provider of UNTESTED SAS code from the Clue?Gee!Wrx <--