R-WRITE-FUNCTION (op-code 8)

This routine adds a new record to the file. It has four parameters: file_handle, record, length, and keyval.

file_handle    must be a valid file handle returned by R-OPEN-FUNCTION.
record is the record data to write to the file.
length is the number of bytes to write (for variable-length files).
keyval is the record number to write. A keyval of -1 means to write at the end of the file.

The R-WRITE-FUNCTION routine does not change the current file position.