Using the SET FILEWAIT Command
If you want your program to continue waiting for a file or directory that is implicitly locked,
you can use the SET FILEWAIT command. A sample format of the command follows:
If you use SET FILEWAIT ON, this means you do not want a request to fail because you cannot obtain immediate control of a file or directory. The request will wait until the required object becomes available or until you re-IPL or log off. For example, at the end of the day you could choose to start a program and disconnect your virtual machine.
If you do not wish to wait for an implicitly locked file or directory, use SET FILEWAIT OFF. This means that requests will fail immediately if a file or directory is not available.
If the file or directory is explicitly locked, you will not wait, regardless of the SET FILEWAIT setting.