This routine reads a record out of the relative file. The R-READ-FUNCTION routine has three parameters: file_handle, record_area, and keyval.
file_handle | must be a valid file handle returned by R-OPEN-FUNCTION. |
record_area | points to the area to hold the record read. It must be at least MAXSIZE bytes in length. |
keyval | is the record number of the record to read. It is a long value. |
If R-READ-FUNCTION succeeds, RETURN-CODE is set to the size of the record read, plus one. If it fails, RETURN-CODE is set to zero. However, if the function fails because the record is locked, the file pointer is set to the locked record.
Records read in a file open for input only are not locked. Furthermore, most file systems do not block the reading of locked records in a file open for input (this feature depends on the host file system - not all support it). Records read from a file open for I/O are automatically locked unless the external variable f-no-lock is set to a non-zero value, in which case they are treated in the same manner as files open for input.