Previous Topic: Alter the Status from SHR to EXCL

Next Topic: Associate Text with a Resource Lock

WAIT Operand

As with normal shared and exclusive requests, the WAIT operand plays an important part in determining the success or failure of a request to alter the lock status. However, the waiting period is only significant for a request to change from shared to exclusive, as the request to change from exclusive to shared is always satisfied immediately.

When WAIT=NO is specified, the request fails unless it is satisfied immediately.

When WAIT=nnnn or WAIT=YES is specified, the requesting process can wait for the specified period of time for the change to be successful (this will happen when another process releases its lock).

If the status type on the &LOCK ALTER request is the same as the current status, the request is treated as a request to alter the lock text only-for example, the process holds a shared lock then issues a shared lock request with the ALTER=YES operand. This request is always successful.