WAITFILE parameter

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 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.

Values allowed

*IMMED
The program does not wait; when the file is opened, an immediate allocation of the file resources is required.
*CLS
The default wait time specified in the class description is used as the wait time for the file resources to be allocated.
1-32767
Specify the number of seconds that the program waits for the file resources to be allocated.