Flushing buffers

You can use the C library function fflush() to flush data.

For text files, calling fflush() to flush an update to a record causes the new data to be written to the file.

If you call fflush() while you are updating, the updates are flushed out to VSAM.

For more information on fflush(), see z/OS XL C/C++ Runtime Library Reference.