Skip to main content


Writes an end-of-file to a sequential file.


WEOFSEQ filevar [ON ERROR statements]


filevar A file variable name used to refer to the file in Caché MVBasic. This filevar is obtained from OPENSEQ.


The WEOFSEQ statement is used to write an end-of-file indicator to a file that has been opened for sequential access using OPENSEQ. Placing an end-of-file indicator renders all data past that point inaccessible to READSEQ statements. Placing an end-of-file indicator has no effect on WRITESEQ statements, or on the pointer position count provided by the STATUS statement.

You can optionally specify an ON ERROR clause, which is executed if the end-of-file write fails.

You can also use the STATUS function to determine the status of the write operation, as follows: 0=success; -1=operation failed because file not open (or opened by another process).

See Also

FeedbackOpens in a new tab