Microsoft KB Archive/37489
RESTRICT/AUTOLOCK Directives Not Documented in COBOL 3.0
PSS ID Number: Q37489 Article last modified on 04-20-1993
3.00 3.00a | 3.00 3.00a MS-DOS | OS/2
|The information in this article applies to:|
|- Microsoft COBOL for MS-DOS and OS/2, versions 3.0 and 3.0a|
Summary: The MS(2) compatibility option in SETUP builds a COBOL.DIR file that contains the RESTRICT(SEQUENTIAL), RESTRICT(LINE SEQUENTIAL), and AUTOLOCK directives. These networking directives are not documented in Microsoft COBOL Versions 3.0 or 3.0a.
More Information: The AUTOLOCK directive forces a file that has a LOCK MODE IS EXCLUSIVE in the SELECT statement to perform as LOCK MODE IS AUTOMATIC. This means AUTOLOCK converts file locking into single-record locking. The RESTRICT directive overrides (turns off) the AUTOLOCK directive. Consider the two examples below when the COBOL.DIR file contains the following: AUTOLOCK RESTRICT(SEQUENTIAL) RESTRICT(LINE-SEQUENTIAL) 1. The following file would have AUTOMATIC record locking because of the presence of the AUTOLOCK directive: SELECT first-file ASSIGN to DISK ORGANIZATION IS RELATIVE LOCK MODE IS EXCLUSIVE. 2. The following file would have EXCLUSIVE file locking because the effect of the AUTOLOCK directive is canceled by the RESTRICT(SEQUENTIAL) directive: SELECT second-file ASSIGN TO DISK ORGANIZATION IS SEQUENTIAL LOCK MODE IS EXCLUSIVE.
Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.