Turns off buffering for sequential file I/O.
By default, sequential file I/O is performed using I/O buffering. This buffer is automatically assigned as part of the OPENSEQ
operation. I/O buffering significantly improves overall performance, but means that write operations are not immediately applied to the sequential file. The NOBUF
statement disables the I/O buffer for an open MultiValue sequential file. That is, all I/O operations are immediately executed on the sequential file.
You can optionally specify a THEN clause, an ELSE clause, or both a THEN and an ELSE clause. If the file buffer is successfully disabled (the specified filevar
exists), the THEN clause is executed. If the buffer disable fails (usually because the specified filevar
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 FLUSH
statement, which immediately writes the current contents of the I/O buffer to the sequential file.