The WAITFILE parameter allows you to specify whether and how long a program waits for resources.
You use the WAITFILE parameter to specify the maximum number of seconds that a program waits for the following:
If the program must wait, it will be placed in a wait state until the resources are available or until the wait time expires. If two or more file resources are needed and are not available because they are being used by different system users, the acquisition of each resource might require a wait. This maximum is applied to each wait.
The length of the wait can be specified in this parameter, or the default wait time of the class that applies to the object can be used. If the file resources cannot be allocated in the specified number of seconds, an error message is returned to the program.
The file resources that must be allocated depend on the type of file being opened. File resources consist of the following.
The Allocate Object (ALCOBJ) command can be used to allocate specific file resources before the file is opened.
The session resources that were allocated for an APPC device conversation can be lost between the time the application issues a detach function or receives a detach indication and the time another evoke function is issued. If the session resource is lost, this parameter is used to determine the length of time that the system waits for another session resource.