On Sat, 18 Jun 2022 12:35:36 -0500, John McKown wrote: 
>    ...
>    Remember that the actual I/O buffer is in a UNIX filesystem address
>space. So an application reading & writing a file are actually getting data
>from it. If you were to save data (or run some program which updates it),
>the actual data would be, in effect, merged or overlain in strange ways in
>the I/O buffer before it is written to disk.
> 
I think of fwrite() as akin to QSAM PUT -- it moves the data to a buffer which
is hardened later at a time not well controlled (except by fsync().)  In 
contrast,
write() *appears* to  harden the data instantly because the kernel (or "UNIX
filesystem address space" in the z/OS case) makes those buffers visible
transparently to other processes.  (SDSF seems to do likewise for spool
data sets.)

Verify this by doing a "tail -f" on a file to which another job intermittently
does printf of a few bytes at a time.

I wonder how this would all work with DSFS?

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to