WRITELOCK Compiler Directive

With this COBOL system you can use the WRITELOCK Compiler directive to write a record to a file and obtain a lock on the record written. Locks are also obtained on records that are re-written to the file.

With Btrieve the record is first written or re-written to the file and then read back to obtain a lock on the record. This requires a number of calls to the Btrieve run-time system with small time lapses between the calls. It is possible, therefore, for a second user to access the record and obtain a lock on the written record before it can be read back with a lock by the first user.