X Table 10. Statements Affecting Record Locking | |
X Statement | X Comments |
---|---|
X CLOSE X X |
X After you successfully CLOSE a file, any record and file X locks held by the file connector on the closed file are X released. |
X DELETE X |
X You cannot DELETE a record that any other file connector has X LOCKed. |
X OPEN X X |
X If you attempt to OPEN a file that another file connector X has LOCKed, the OPEN fails and you receive a 'file locked' X file status (98). |
X READ X X X X X X X X X X X X X X X X |
X For files opened for INPUT, READ statements will not acquire X a record lock. X If you attempt to READ a record that another file connector X has LOCKed, the READ fails and you receive a 'record locked' X file status (FS 99). For a sequential READ, the setting of X the file position indicator is unaffected. For a random X READ, the setting of the file position indicator is X unspecified. X When you specify the READ statement at the end of the file X (when no more records exist), the AT END condition is X returned regardless of any sharing of the file. This X situation can occur if the file is opened in EXTEND mode by X another file connector. X If you OPEN the file for I-O and specify the LOCK MODE IS X AUTOMATIC clause, each record is locked as it is read and X released by the next I-O statement accessing the file X connector. |
X REWRITE X X X X |
X You cannot specify the REWRITE statement for a record that X another file connector has LOCKed (the file is exclusive). X If LOCK MODE IS AUTOMATIC is specified (the file is X shareable), you can use the REWRITE statement to release a X record that is LOCKed. |
X START X X X |
X You cannot use the START statement to LOCK a record or to X detect if a record is LOCKed. However, the START statement X will release an existing LOCKed record if you have specified X the LOCK MODE IS AUTOMATIC clause. |
X WRITE X X X X X X X X X X |
X If two or more file connectors add records to a file by X sharing the file after opening it in EXTEND mode, the X following occurs: X ° Sequential files: the records are in an unspecified X order. X ° Relative files: the relative key values returned are X ascending but not necessarily consecutive. X ° Indexed files: the order of the alternate keys allowing X for duplicates is unspecified. X When you specify LOCK MODE IS AUTOMATIC, a successful WRITE X statement releases a LOCKed record. |
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.