Top  Previous  Next


The UNLOCK command, available only in the QMSYS account, releases task, record or file locks set by any process.





UNLOCK { USER user.no }  { FILE file.no }  { ALL  | record.ids... }


UNLOCK { USER user.no }  { FILE file.no } FILELOCK





In the first form, UNLOCK releases record ids set by user user.no on file file.no. At least one of these options must be present. The values of user.no and file.no can be found from the output of the LIST.READU command. The UNLOCK requires either a list of record ids or the ALL keyword to determine which records to unlock.


In the second form, the file lock set by the specified user on the given file is released. Again, at least one of the USER and FILE options must be specified.


The third form allows task locks owned by other users to be released. Any number of locks may be released in a single command.


The UNLOCK command is restricted to users with administrator rights and should be used with great care. Locks are taken by application software to protect critical operations. Releasing a lock can cause data integrity problems.






File  Path


File User Type Id

 17    4  RU  18464

 17    4  RU  21968



In this example, LIST.READU is used to check which locks are outstanding and the UNLOCK command is used to release a specific record lock.