Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Methods for writing records

The write() method writes a record into the file at the current file position. Any existing record is overwritten, but only if the restrictions applicable for the access method (for example same record length) are complied with. If the current file position is the end of file (or after this), the file is extended. After writing, the current file position is the record after the written record or the end of file.

In shared update processing, an existing record can only be changed safely (when there are competing applications) if the record lock implicitly set when reading is not released between reading and writing - in particular, no other record must be read or written in the meantime. You should therefore follow a corresponding sequence of actions in shared update processing; however, no check of this sequence is made.

The flush() method ensures that all records written with write() are output to the file even if the underlying access method provides buffering. Shared update processing also ensures that a lock received for a file by the application is released.

Special features of the DMS file system

When shared update processing is used in the DMS file system, information on the current end-of-file cannot be synchronized between participating applications. Simultaneous extension of RandomAccessRecordFiles by multiple applications is not therefore recommended.