Compaq COBOL AAQ2G1FTK User Manual

Page 259

Advertising
background image

Sharing Files and Locking Records

8.3 Ensuring Successful File Sharing

LOCK MODE IS EXCLUSIVE

You can also select X/Open file sharing by just specifying WITH LOCK on the
OPEN or READ statements. However, it is recommended that you use the LOCK
MODE clause to avoid ambiguity and maintain readability. If this is not done and
any I-O verbs rely on default behavior that might result in ambiguity, you should
compile your program with the X/Open option added to the compile command
line.

Opened files can be exclusive or shareable, as specified by the LOCK MODE
option of the SELECT clause (in the FILE-CONTROL paragraph of the

Advertising