Caché MultiValue Basic Reference
FLUSH
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Flushes (immediately applies) writes to a sequential I/O file.
Synopsis
FLUSH filevar [THEN statements] [ELSE statements]
Arguments
filevar A file variable name used to refer to a MultiValue sequential I/O file. This filevar is supplied by the OPENSEQ statement.
Description
The FLUSH statement flushes the I/O buffer for a MultiValue sequential file. That is, it immediately performs any pending file I/O WRITESEQ operations. It takes the file identifier filevar, defined by the OPENSEQ statement.
You can optionally specify a THEN clause, an ELSE clause, or both a THEN and an ELSE clause. If the file buffer flush is successful (the specified file exists), the THEN clause is executed. If the buffer flush fails (the specified file does not exist), the ELSE clause is executed. The statements argument can be the NULL 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 and cannot follow a THEN, ELSE, or END keyword on that line.
Caché MVBasic also provides a NOBUF statement, which disables I/O buffering, causing all subsequent I/O operations to be immediately issued to the sequential file.
See Also