This is one of two locking methods available with Acu4GL. 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, this method is used; if A_SYB_NATIVE_LOCK_TIMEOUT is set to a positive value, then this method is used. Otherwise, the AcuLocks table is used to hold locks.

A_SYB_VISION_LOCKS_FILE causes the lock table (AcuLocks) to be a Vision file instead of an SQL table. This can be accessed via the configuration variable A_SYB_VISION_LOCKS_FILE, which must be set to the name of the Vision file that will hold the lock information. You must also set a configuration variable that specifies this file as a Vision file (using a _host variable). This file must be accessible to all users accessing the Sybase SQL server, either through a common directory or through AcuServer.

Also included with the Acu4GL for Sybase product is a small COBOL program that will manage this Vision file (lockmgr). This program should be run with the same runtime that you normally use to access Sybase tables, and with the same configuration variables set. The program detects whether Acu4GL for Sybase is available, and detects the A_SYB_VISION_LOCKS_FILE variable to determine which file to manage. This program displays all the records in the lockfile, and provides options for removing single records (by highlighting the desired record to remove) or removing all shown records, and also for restricting the shown records by PID, Table, and Database. You can refresh the display by clicking the Restrict button and then clicking OK without restricting the display further.

If everything is working correctly, there should be no records in this table when there are no users accessing the Sybase SQL server through Acu4GL. The source for this program is in the sample/acu4gl directory.

See also: Record and Table Locking.