WaitForUpdate (Method)
Â
ISession::WaitForUpdate
Wait for screen changes.
Â
Function WaitForUpdate([duration As Long = 5000]) As Long
 Parameters
No | Name | Type | Optional | Default | Description |
---|---|---|---|---|---|
1 | duration | Long | Yes | 5000 | Time in milliseconds to wait for the screen to change before returning |
Return Code | Description | ||||
JGS_OK | Specified wait time has expired without any change in the screen or OIA | ||||
JGS_SYSERROR | The function failed due to a system error | ||||
JGS_PSCHANGED | The OIA or screen have been updated |
Remarks
The function waits for the specified time for the screen to change. If a change occurs the function returns immediately. The change can occur in the screen itself, or in the OIA (operator information area). This means that the function returns even if the cursor position has changed.
Sample Code
Â
Dim timeout as Long
Dim result as Long
timeout = 60000
result = sess.WaitForUpdate(timeout)
If result = JGS_OK then    ' not updated
 ...
Else If result = JGS_PSCHANGED
 ...    ' session updated, do something
Else
 ...    ' error
End If
 Dim result as Long
timeout = 60000
result = sess.WaitForUpdate(timeout)
If result = JGS_OK then    ' not updated
 ...
Else If result = JGS_PSCHANGED
 ...    ' session updated, do something
Else
 ...    ' error
End If
QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.