Consistency of data in the disk file in multi-user mode
By specifying SHARUPD=*YES in the OPEN function, a user can allow concurrent writes to a file.
Consistency of data in the disk file after a system crash
If SAVE is interrupted by a system crash or an aborted task, some modified pages may have been written to file, but not all.
In such cases, the contents of the disk file may be in an inconsistent state.
Consistency of data in a window in multi-user mode
Parallel tasks can lead to inconsistent data in a window only when another write-authorized user modifies the pages of the corresponding file region and one of the modified pages is read into a window following an access.
Users opening a file will not be affected by changes to window pages that are caused by concurrent writes if they:
open with SHARUPD=*NO (no concurrent writes are permitted),
open with SHARUPD=*WEAK for writing (no other user may write concurrently)
open with SHARUPD=*WEAK for reading, provided LOCVIEW=*MAP was specified in the OPEN.
DIV then ensures that none of the file pages being read (when MAP is called) can be modified by any parallel SAVE from users writing to the file. Once the pages have been read, they may be modified by a parallel write operation.
Consistency of data in a window following a system crash
Data which has been modified only in the window but has not been written to the disk file will be lost.
Update status of data in a window
The data in a window will always be up-to-date unless a parallel write operation modifies the pages of the corresponding file region and one of the modified pages is read into a window following an access.
The following DIV features are significant in this context:
A window page is read from the file to the window at the first access and will subsequently be modified by CPU instructions only. A subsequent access will cause the page to be read from the file only after a RESET.
Whether an access will read a page from the file is also dependent on the fact whether the corresponding page exists in the file, i.e. whether the file is located before or after logical end-of-file.
The implementation is decisive for the question when a modification of the logical end-of-file by a write operation will take effect for another concurrent user of the same file. Users cannot rely on the fact that modifications of the logical end-of-file by a parallel write operation will be visible in their own windows.