Synchronization algorithms

Extension for Terminal-based Applications has three synchronization algorithms to determine the state of the terminal. The state of the terminal depends on the loading of presentation space.

The state of the terminal is recorded while you record a script. When the script is played back, Functional Test must wait for the state of the terminal to match the state during recording. The state must be the same in order to avoid sending commands to the host before the host is ready to receive input. The state of the terminal is determined by the operator information area (OIA) status (either locked or unlocked), which depends on the loading of presentation space. The loading of the presentation space is not an instantaneous process and different connection types load the presentation space differently.

The following algorithms gauge the state of the terminal:
  • Default synchronization algorithm
  • 3270 enhanced synchronization algorithm
  • 5250 synchronization algorithm

The default wait period values that the synchronization algorithms use are as follows:

Algorithm Synchronization settings
Default synchronization and 5250 synchronization
  • Timeout (in milliseconds): 1200
  • OIA State Timeout (in milliseconds): 300000
  • Polling Interval (in milliseconds): 100
TN3270E Synchronization Minimum time to wait (in milliseconds): 250

You can change any of these values using the Preferences window.

Default synchronization algorithm

The default synchronization algorithm starts when an attention identifier (AID) key is pressed. An attention identifier (AID) key is any key that triggers a presentation space update. Initially, the state of the terminal is UNINITIALIZED. The algorithm waits for a period of time for updates to the presentation space. You can change the wait time in the Timeout field in the Preferences window. The default wait time is 1200 milliseconds.

If Timeout is set to 1200 milliseconds, and an update occurs during the last 600 milliseconds, the algorithm waits for an additional 600 milliseconds for further updates. If, during this additional wait period, another update occurs during the last 300 milliseconds, the algorithm waits again for another 600 milliseconds for further updates. This continues until no updates are received during the last half of the last additional time period.

At this point, the state of the terminal is either LOADED (keyboard locked) or READY (keyboard unlocked), depending upon the OIA status.

3270 enhanced synchronization algorithm

Initially, the state of the terminal is UNINITIALIZED. The terminal state is not initialized for a minimum wait time. You can change the wait time in the Minimum Wait Time field in the Preferences window. The default value is 250 milliseconds.

The server notifies the algorithm that the presentation space updates are sent. The synchronization algorithm waits for the period specified in the Minimum time to wait field in the Preferences window, and then queries the state of OIA to determine whether or not to report READY. If the synchronization algorithm has waited for the period in the Timeout field in the Preferences window without the OIA state becoming ready, the algorithm reports a state of LOADED. At all other times, it reports a state of UNINITIALIZED. This algorithm requires that the correct service level for the TN3270 server is installed on the host.

Note: Communications Server for z/OS® 1.2 and later, introduced a new function called "contention resolution". If you do not have the latest maintenance levels for Communications Server for z/OS, you might experience COMM655 errors or endless loop conditions when trying to connect to a z/OS host. In such cases, configure your connection configurations so that they do not use contention resolution.

To change the contention resolution setting: In the Extension for Terminal-based Applications window, open the Advanced Settings window by clicking Advanced. Scroll to negotiateCResolution property in the Configure optional advanced settings list. Change the setting for this property from true to false.

5250 synchronization algorithm

Presentation space update events occur only once for 5250 sessions and not in groups as in 3270. The 5250 algorithm operates like the Default synchronization algorithm with one exception: When an update occurs, the state changes immediately to LOADED or READY, depending on the OIA state.

When you play back the script, HCL OneTest™ UI waits for the host terminal to show an appropriate state before it continues to run commands from the record script.

You can change the time setting in the Preferences window.

Note: Synchronization algorithms might not work all of the time with the specified time values, especially in dealing with hosts that have long network delays. If synchronization does not work with a certain part of your application you can insert manual sleep timers into the script to adjust the timing aspect or use manual synchronization. For more information, see the related topics.