Share this page

# 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.

## Return Values

This function returns 0 if it succeeds, and a negative error code if it fails. It also sets the global variable TE_errno.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following script segment, the script logs on with the user name "QUSER" and the password "MYPASS". The script then presses Enter to submit the login details to the server. The TE_wait_sync statement causes the script to wait until the server has responded to the login request before executing the next line of the script.

Copy code

    TE_type("QUSER");
    lr_think_time(2);
    TE_type("<kTAB>MYPASS");
    lr_think_time(3);
    TE_type("<kENTER>");
    TE_wait_sync();
    ....

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: