If you do a WEOFSEQ after all your WRITESEQs, the file will be truncated
at that point.  Something like this:

OPENSEQ 'path/filename' TO F.SEQ ...
* pointer is at beginning of file
LOOP
WHILE STUFF.TO.WRITE DO
WRITESEQ STUFF.TO.WRITE ON F.SEQ ELSE ...
REPEAT
WEOFSEQ F.SEQ
...

This insures that even if what you're writing this time is fewer 'lines'
than last time, the file will not contain any leftovers at the end.

Richard B. Lewis
Sr. Software Engineer
 
Dynix
r l e w i s at d y n I x dot c o m
www.dynix.com
 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Moore
Sent: Tuesday, August 24, 2004 11:41 AM
To: [EMAIL PROTECTED]
Subject: [U2] Clearing a Sequential File:

I am able to OPENSEQ and WRITESEQ for a sequential file, and need to
clear the records or data before writing to this file.  I have tried
CLEAR and CLEARFILE, but may not have the correct syntax.  How do I go
about this?

TIA, as always.
Ron
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to