WAIT_FOR_LOCKS

This determines how the runtime handles file status error 99 conditions on record reads. This variable is not checked on record write operations. It can have one of the following values:

0 Do not wait for locked records, return error 99.
1 Wait for the locked record if no Declarative is available for the file, otherwise return error 99.
2 Always wait for the locked record, never return error 99.

Any other value (including the default value of -1) causes the runtime to wait for locked records only if you have compiled for RM/COBOL compatibility and the file does not have a Declarative.