Top  Previous  Next


The GETLOCKS() function returns information about file and record locks.





GETLOCKS(file, user)




fileis the file variable referencing the file for which locks are to be reported. All files are reported if this is not a valid file variable.


useris the user number for which locks are to be reported. All users are reported if this is zero.



The GETLOCKS() function returns a string where field 1 contains three values:

1        NUMLOCKS configuration parameter value

2        Current record lock count

3        Peak number of record locks

and the remaining fields each describe a record or file lock as seven values:

1        Internal file number

2        Pathname

3        User number

4        Lock type

5        Record id, null for a file lock

6        User name of lock owner

7        Time lock was acquired as an epoch value


The lock type code is

FXFile exclusive lock
RLShareable read lock (READL)
RUExclusive read lock (READU)
SXFile lock for CLEARFILE







This statement returns lock information for all files and all users.