Prototype
subroutine EcsWatchAndWait(integer: TimeLimit, string:WatchCommandString)
Description
Executes previously queued watch command(s) and waits until a new screen is ready before allowing your application to take other responses.
Parameters
TimeLimit  | 
Input  | 
The number of milliseconds to wait for the required screen.  | 
WatchCommandString  | 
Input  | 
A string that contains the watch instructions.  | 
Return Value
ECS_E_NOTINIT  | 
Not initialized - command was ignored  | 
ECS_E_NOTCONN  | 
Not connected to an active session  | 
ECS_E_WATCH  | 
Empty or invalid WatchCommandString  | 
ECS_E_MULTWATCH  | 
Multiple watches are not currently supported  | 
ECS_E_BADTIME  | 
Illegal time limit specified (0 < time limit < 1 hour)  | 
ECS_E_NOT3270SESSION  | 
Not connected to a 3270 session - The EcsWatchForScreen command can only be used with a 3270 session.  | 
ECS_E_ERRORFREE  | 
No errors were generated  | 
Example
###***********************************
### Actions to watch for a new screen
###***********************************
action WatchForNewScreen is
call EcsClearWatch ( EcsWatchCommandString )
copy value of SettleTime_SB to SettleTime_IV
call EcsWatchForIIOff ( SettleTime_IV, EcsWatchCommandString )
call EcsWatchAndWait ( EcsTimeLimit, EcsWatchCommandString )
if (errorlevel != ECS_E_ERRORFREE) then
copy errorlevel to ErrorLevel_IV
call DisplayError( ErrorLevel_IV )
end if