Writes an end-of-file to a sequential file.
WEOFSEQ filevar [ON ERROR statements]
||A file variable name used to refer to the file in Caché MVBasic. This filevar is obtained from OPENSEQ.
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
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).
© 1997-2019 InterSystems Corporation, Cambridge, MA