User Tools

Site Tools


flush_flush_buffers_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== FLUSH (flush buffers) ====== Previous pageReturn to chapter overviewNext page

FLUSH(file)

blk2blue.jpg

FLUSH Terminates a STREAM operation, flushing the operating system buffers to disk, or flushes the BUFFER statement's buffers.
file The label of a FILE or VIEW.

The FLUSH statement terminates a STREAM operation. It flushes the operating system buffers, which updates the directory entry for that file. FLUSH will also flush the file driver's buffers allocated by the BUFFER statement. If both STREAM and BUFFER are active, all buffers are flushed.

Support for this statement is dependent upon the file system and its specific action is described in the file driver documentation (if different from that described here).

Example:

STREAM(History)            !Use DOS buffering

SET(Current)               !Set to top of current file

LOOP

NEXT(Current)

IF ERRORCODE() THEN BREAK END

His:Record = Cur:Record

ADD(History)

END    

FLUSH(History)             !End streaming, flush buffers

OPEN(MyView)

BUFFER(MyView,10,5,2,300)  !10 records per page, 5 pages behind and 2 read-ahead,

                          !with a 5 minute timeout

                          !Process records

FLUSH(MyView)              !Flush buffers

See Also:

STREAM

BUFFER

flush_flush_buffers_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1