Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

WEOFSEQ

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

Synopsis

WEOFSEQ filevar [ON ERROR statements]

Arguments

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

Description

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. The statements argument can be the NULL placeholder keyword, a single statement, or a block of statements terminated by the END keyword. A block of statements has specific line break requirements: each statement must be on its own line; there must be a line break between the ON ERROR keyword and the first line.

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