FCONTROL() |
|
|
The FCONTROL() function performs control actions on an open file.
Format
FCONTROL(fvar, action {, qualifier})
where
The FCONTROL() function performs the action defined by action against the file open as fvar.
The action values are listed below using the tokens defined in the SYSCOM KEYS.H include record:
FC$SYNC (1) Controls or reports the state of forced writes for a dynamic hashed file. See synchronous (forced write) mode in the section that discussed dynamic files for more details.
If qualifier is false (0), forced writes are disabled. If qualifier is true (1), forced writes are enabled. For all values of qualifier, the previous state of forced writes is returned as the result of the function.
Note that, if the file is open to multiple file variables within the one process, this action affects all writes to the file regardless of which file variable is used.
Example
OPEN "AUDIT" TO AUD.F ELSE STOP "Cannot open AUDIT file" VOID FCONTROL(AUD.F, FC$SYNC, @TRUE)
This program fragment opens the AUDIT file and sets forced write mode. The same effect could have been achieved with the SYNC option to the OPEN statement.
See also: |