If the last operation on a non-VSAM file opened for record I/O was a read, a write operation may not directly follow.
The write operation fails.
Invoke fflush(), rewind(), fseek(), or fsetpos() between the read and write operations on the file stream.
EDC4SD