This is one of two locking methods available with Acu4GL for Sybase. The methods are accessed via two configuration variables: A_SYB_VISION_LOCKS_FILE and A_SYB_NATIVE_LOCK_TIMEOUT. The lock method used is determined as follows: If A_SYB_VISION_LOCKS_FILE is set to the name of a Vision file that can be open I/O and has the correct structure, the Vision file is used to hold lock information. If A_SYB_NATIVE_LOCK_TIMEOUT is set to a positive value, native locking is used. Otherwise, the AcuLocks table is used to hold locks.
This locking method enables you to use Sybase native locks if you explicitly code transactions in your COBOL program. You can access this method by setting the configuration variable A_SYB_NATIVE_LOCK_TIMEOUT to a positive value. This value is the number of seconds that a connection waits for a timeout to occur. When such a timeout occurs (for any reason), the Acu4GL product assumes that timeout was caused by a locked record and returns error 99 (record locked). If you set this variable but do not explicitly code transactions in your COBOL program, record locking does not occur. Note that the Acu4GL product waits the number of seconds specified, and your application may seem to not respond if the timeout is too long. On the other hand, if the timeout is too short, you may get record locked errors when the network is slow.
Sybase uses a page locking mechanism, and so this method of locking records may cause your application to return spurious record locked errors because of a record being locked on the same page as the record you are trying to access. If a future version of Sybase implements row-level locking, this locking method may be the preferred method.