FOPEN_ program instruction detailed below. (All bits are assumed to be clear if no mode value is specified.) Bit 1 (LSB) Disable prereads (mask value = 1) If this bit is clear, eV+ will read a record as soon as the file is opened (a preread) and after each READ instruction in anticipation of subsequent READ requests. If this bit is set, no such prereads are performed. Bit 2 Enable random access (mask value = 2) If this bit is clear, the file will be accessed sequentially. That is, records are read or written in the order they occur in the file. If this bit is set, the file is accessed using random access (which is allowed only for disk files with fixed-length records).
In random- access mode, the record-number parameter in the READ or WRITE instruction specifies which record is accessed. Bit 4 Force disk write (mask value = 8) If set for a disk file being opened for write access, the physical disk is written every time a record is written. In addition, the directory or file allocation information is updated with each write. This mode is equivalent to (but faster than) closing the file after every write. It is much slower than normal buffered mode, but it guarantees that information that is written will not be lost due to a system crash or power failure.
This mode is intended primarily for use with log files that are left opened over an extended period of time and intermittently updated. For these types of files, the additional (significant) overhead of this mode is not as important as the benefit. file_spec String constant, variable, or expression specifying the file to be opened. The string may contain an optional disk unit and an optional directory path, and must contain a file name, a period (.), and a file extension.
(For FOPEND, the file name and extension are optional, and both can contain wildcard characters-see below.) The current default disk unit and directory path are considered as appropriate (see Using Directories for additional information on disk units and directory paths.) Details This instruction opens a disk file so that input/output (I/O) operations can be performed. When the I/O operations are complete, the file should be closed using an FCLOSE or DETACH instruction. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 248