TIMEOUT

Specifies a time limit for screen display to remain in effect without user entry.

Type

Dialog Language function

Format

TIMEOUT([hh:mm:ss |mm:ss |seconds |time_variable])
hh
Time interval in hours (00 through 23).
mm
Time interval in minutes (00 through 59).
ss
Time interval in seconds (00 through 59).
seconds
Time interval in seconds (0 through 9999).
time_variable
Name of a variable that contains the timeout value.
omitted
Return the current timeout value.

Usage Notes®

  1. Express® the time interval as a literal, or as a string variable.
  2. A time interval of zero (00) disables the time limit.
  3. If no ON 'TIMEOUT' dialog is specified, the terminal is logged off. Otherwise, the calling dialog branches to the ON 'TIMEOUT' dialog.
  4. If you have an auto update active for your foreground session, TIMEOUT does not occur.
  5. Every issuance of TIMEOUT resets any previously issued values.
  6. Issuing TIMEOUT resets any value specified in the associated HOSTGATE or DIALOG ACB statement.
  7. Issuing TIMEOUT with no operands will return the current value in seconds, for the session timeout. If no TIMEOUT has been previously issued, this is the value specified in the associated HOSTGATE or DIALOG ACB statement.
  8. Use TIMEOUT with a SET statement to return the current value. If TIMEOUT specifies a new time interval, the new value is returned in seconds.

Example

Determine the current TIMEOUT value for the session:
set tot (timeout())

Variable tot contains the current terminal timeout value, in seconds.

TIMEOUT waits one-and-one-half hours:
timeout(01:30:00)
or
timeout(5400)
TIMEOUT waits one-and-one-half minutes:
timeout(01:30)
or
timeout(90)
If the value of variable maxtime equals 130, TIMEOUT waits 130 seconds:
timeout(&maxtime)

See Also

ON 'TIMEOUT'