> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Zelden
> Sent: Tuesday, January 29, 2008 4:17 PM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: Re: Keep only the tail of the dataset
> 
> 
> On Tue, 29 Jan 2008 15:35:09 -0600, McKown, John
> <[EMAIL PROTECTED]> wrote:
> 
> >And none of these relate to the original post. The OP wanted 
> a automatic
> >way to have a file wrap around after "n" writes. 
> 
> <snip>
> 
> I'm not so sure of that.  Re-read it.  To me is sounded like 
> the OP had this
> large file, but was only interested in the last n records.   
> Perhaps they
> will clarify.
> 
> Mark

Yes, after rereading the OP, I can see that now. So, the simple way is
to put the data to a temporary file, then write another small program
which buffers the last "n" records in memory. When that program gets
EOF, then write the buffered records. Or use the "tail" command as so
many others have indicated.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to