Please enable JavaScript to view this site.

R:BASE 11 Help

Syntax: SET WAIT value

 

Range: 0 to 16383 seconds

 

Default: 4

 

SET WAIT sets the minimum number of seconds to retry the last requested resource (a table or database) before halting execution. Rather than aborting execution, SET WAIT allows you to set a length of time for R:BASE to keep trying to access a resource.

 

If you do not run a SET WAIT command, R:BASE automatically retries the locked resource for approximately four seconds.

 

For commands that wait for resources, the precise period of the wait is at least as long as the time specified. On some computers, processing requirements may extend the length of the wait to longer than one second for each second designated.

 

When you enter a command from the R> prompt and the waiting period expires, R:BASE displays a message informing the user that the resource is unavailable. When the command runs as part of a command file, however, and the waiting period expires, R:BASE displays the unavailable resource message, ignores the command, and goes on to the next command.

 

The following command tells R:BASE to retry the last requested resource for approximately 20 seconds.

 

 SET WAIT 20        

 

You can also adjust the INTERVAL in which R:BASE tries the command during the SET WAIT period.

 

Effects of the SET WAIT Command

The SET WAIT command specifies the period in seconds in which R:BASE continues to retry the last command before stopping processing. If you set the wait period too long, you can have your users sitting unproductively for long periods. Be sure you set manual table locks (discussed later) only when absolutely necessary. If users are running programs that lock tables, set resource wait periods reasonably short to avoid users leaving workstations for a long without exiting the database.

 

A wait period can help prevent a deadlock. A deadlock occurs if a user locks a table and then waits for a table previously locked by a second user, who in turn is waiting for the table locked by the first user. R:BASE prevents deadlocks because a command either accesses a resource or eventually stops trying to obtain access.