Finding an Implicit Lock

Because implicit locks are short term, the QUERY LOCK command does not display information about them. Even if it did so, the information might be incorrect by the time the output was displayed. To check for implicit locks:

  1. Issue the command SET FILEWAIT ON.

    This command tells CMS to wait for the file or directory to become free if a lock conflict occurs.

  2. Reenter the command that was causing the lock problem.

    If the command succeeds, the implicit lock was just freed. Enter SET FILEWAIT OFF and continue your work.

    If the command fails and produces an error message, another user may have just acquired an explicit lock. Otherwise, the file or directory may have been erased, or your authority to it may have been revoked.

  3. If the command execution time is lengthy, ask another user to enter the QUERY FILEPOOL CONFLICT command for you.
For example, if the user CROCKETD suspected there was an implicit lock on the file he wanted to access, he would ask another user to enter the following command:
query filepool conflict crocketd poolq:
The result would look like this:
Requester   Holder     Wait          Lock        Lock Type
BRISEED     SMITH      Lock          File        Share
MIKEB       SMITH      Lock          File        Share
CROCKETD    SMITH      Lock          File        Share
The first two columns show the most important information: who is requesting the lock, and who is holding the lock. CROCKETD, along with two other users, is waiting for SMITH. The other users are in the queue ahead of CROCKETD. When SMITH frees the lock, BRISEED will be the next user in line for the file.

The third column, Wait, indicates the wait state of the Holder. In this example, each of the users is waiting for a lock to be freed. The Lock column indicates the type of resource for which the Request has requested a lock. The Lock Type column displays the type of lock that the Request wants placed on the resource.

Note: The QUERY FILEPOOL CONFLICT command does not show conflicts caused by explicit locks because CMS never waits for an explicit lock, even if FILEWAIT is on.
Once you find out who is holding the lock, you can call or send that user a message to see when the lock will be deleted. If you choose not to continue waiting, enter:
#cp ipl cms
When you IPL CMS, SFS realizes that you have ended your CMS session and stops waiting to process your command. During CMS initialization, FILEWAIT is automatically reset to OFF.