Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

RTI_WRITEURTI_WRITERELEASE

Example

 
Code Block
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