Version 4.5.2
 —  Commands  —

WAITFOR

Description

Wait for a specific condition on the terminal emulation screen that will be sent by the host.

If the condition is true, the corresponding statement is executed.

If the condition is false, or if the time period defined in the system variable RESPONSE has exceeded without receiving a screen from the host, the next statement is executed.

Syntax

WAITFOR screenvariable operator string command 

screenvariable represents the variable *SCREEN (syntax see below).

operator is one of the following:

EQ equal
NE not equal
GE greater than or equal to
LE less than or equal to
GT greater than
LT less than

For command, you can use any Entire Connection command except the following:

IF
IFNOT
WAITFOR

Syntax for *SCREEN

The variable *SCREEN can only be used once per WAITFOR.

*SCREEN [row column [length]]

row is a value between 1 and the maximum number of lines +1.

column is a value between 1 and the maximum line size.

length is a value between 1 and the screen size.

For example:

*SCREEN means the whole screen.

*SCREEN 2 1 means from row 2, column 1 to the end of the screen.

*SCREEN 2 1 80 means from row 2, column 1, the next 80 positions.

Examples

Procedure File Example

Waitcmds.ncp

Variables Returned

If the condition is true, the screen position of the string is returned in the following local variables:

#ROW - valid values are between 1 and the maximum number of lines +1

#COL - valid values are between 1 and the maximum line size

Related Commands

IF, PAUSE, SLEEP, WAIT, WAITM

Usage

Procedure File: Yes
Command Line: No
Key: No
API: No

Top of page