Description
Lock and read a record from the specified table. If the table is on an MVBFS volume, then host (back-end) record locking will be performed; if the table is on an OpenInsight volume, then the record will first be locked with the LOCK statement and then (if the lock is successful) the record will be read.
Syntax
Rslt = RTI_READU(table, id, recordvar)
Parameters
The function has the following parameters:
Parameters | Description |
---|---|
Table | Either the name of a table to read from, or a handle to an already-opened table |
Id | The record key to read |
Recordvar | The record that has been read (set by RTI_READU) |
Returns
RTI_READU returns a flag indicating success (STATUS_READ_OK$), error (FS_READ_ERR$), no record found (FS_REC_DNE$), or the record has been locked by some other user and cannot be accessed (FS_SYS_LOCK_ERR$). These flags are defined in the RTI_READU_EQUATES insert (which includes the actual FSERRORS_100 insert).
See also
Example
SUBROUTINE READU_EXAMPLE(VOID) $insert RTI_READU_EQUATES RSLT = RTI_READU(“BOOKS”, “100”, BOOKREC) BEGIN CASE CASE RSLT = STATUS_READ_OK$ * Record has been read successfully CASE RSLT = FS_REC_DNE$ * No such record found CASE RSLT = FS_SYS_LOCK_ERR$ * Record locked CASE RSLT = FS_READ_ERR$ * Other (fatal) error END CASE RETURN 0