2010-10-07

acuCOBOL File Lock

1. Indexed and Relative files, not for sequential files.
2. I/O mode, not input-only mode.

Two modes of locks:
1.Automatic
2.Manual

Single and Multiple record locks

Record locking for indexed and relative files is used for all machines. Currently, record locking is not supported for sequential files. Only files opened in the I/O mode will actually lock records; input-only files will not lock records they read. Record locking occurs in one of two modes: automatic (the default) and manual. In automatic mode, a record is locked when it is read (unless the WITH NO LOCK or ALLOWING UPDATES phrase of the READ statement is used). In manual mode, records are locked only when WITH LOCK is specified on the read statement. Both modes support single and multiple record locks. When single record locks are used (the default), the currently locked record is released whenever any I/O statement is executed for the file. When multiple record locks are used, records become unlocked only when an UNLOCK or CLOSE statement is executed for the file (or a COMMIT is executed for a transaction file).

COBOL and SQL

COBOL data processing is based on keyed READ operations following a positioning operation.