READ (Only) File Access
ANSI
The READ access mode is optional for PREPARE/OPEN instructions and designates the file for inquiry (read only) purposes.
Note the following:
READ mode allows access to files that were opened in EXCLUSIVE, SHARE, or SHARENF mode by another process or are write-protected. An attempt to perform an output instruction to a file opened in READ mode generates an I/O error.
A system open on the file is performed upon execution of an OPEN or PREPARE instruction. The file handle remains open until the file is closed or the program terminates.
Throughput from files opened in READ mode is faster than those in SHARE or SHARENF mode.
READ mode is useful for inquiry only purposes.
See Also: Disk I/O Instructions
![]() |