|Example: TE_wait_sync||Synchronization Functions|
Waits for the system to return from SYSTEM X or Input Inhibited mode.
int TE_wait_sync( void );
During execution, the TE_wait_sync function suspends script execution and waits for the "X SYSTEM" message to be removed from the screen before continuing. The appearance of the "X SYSTEM" message indicates that the system is in Input Inhibited mode.
When you record using VuGen, a TE_wait_sync statement is automatically inserted into the script every time an "X SYSTEM" message appears.
When you replay a TE_wait_sync function, if the system does not stabilize before the synchronization timeout expires, the TE_wait_sync function returns an error code. To set the synchronization timeout, enter a value (in seconds) in the Timeout box of the RTE Runtime settings tab (Runtime Settings dialog box). The default timeout value is 60 seconds.
After a script executes a TE_wait_sync function, the script waits until the terminal is no longer in the X-SYSTEM mode. After the terminal returns from the X-SYSTEM mode, the system is monitored for a short while longer to ensure that the terminal is fully stable i.e., that the system has not returned to the X-SYSTEM mode. Only then does the TE_wait_sync function terminate. To set the time to continue to monitor the system after the system has returned from the X-SYSTEM mode, enter a value (in milliseconds) in the Stable time box of the RTE Runtime settings tab (Runtime Settings dialog box). The default stable time is 1000 milliseconds.
Note: You can use the TE_wait_sync function only with IBM block-mode terminals, such as the 5250.
This function returns 0 if it succeeds, and a negative error code if it fails. It also sets the global variable TE_errno.
You cannot use standard parameterization for any arguments in this function.