Skip to main content

Problem:

You may encounter a File Status error 9/068 (record locked) on reads of records in an INDEXED file that you know are being read by other processes but you are certain are NOT being LOCKed.

For example,  assume several processes are all running the same program. The program has LOCK MODE MANUAL set in the SELECT clause. It opens the file I-O, sets the record pointer using START NOT LESS THAN and then READ's NEXT through the file with out any locking on the reads.

Provided there is not a different program accessing that file there should NOT be any record locking take place, but it can.

Resolution:

Specify the NODETECTLOCK compiler directive.

NOTE: This error does not occur if the file is opened INPUT

             This did not behave in this manner in Object COBOL Developer Suite

              The locking doesn't necessarily occur on the same record key (i.e. the record that is locked

              in one process may not be the same record in another process

               It seems that the closer together the processes are activated the more likely to encounter this                error

Old KB# 7274

#COBOL
#AcuCobol
#RMCOBOL
#ServerExpress
#netexpress