Please enable JavaScript to view this site.

ESL Documentation

Host transmissions to the screen buffer take time. At 10:00 a.m. on any given day, a screen transmission from the hostmay take twice as long to reach a terminal as it would at 8:00 p.m. If your application examines the screen buffer too soon, it may try to perform actions based on an incomplete screen. ECS provides a set of subroutines through the ECS Watch Facility to allow you to synchronize your ESL program with the host. The subroutines listed in this section allow your program to synchronize with the host application so that the screen buffer is examined only when it contains a complete screen.

To use the ECS Watch Facility, follow these steps:

1. Define a sequence of one or more watch commands using the following calls to the DLL:

EcsClearWatch

EcsWatchForScreenSize

EcsWatchForStringAt

EcsWatchForStringNotAt

EcsWatchForCursorAt

EcsWatchForCursorNotAt

EcsWatchForIIOff

These commands define a set of conditions that must all be satisfied, in sequence, before the transmission of a screen is considered to be complete. Because these conditions are checked in order, once a condition is satisfied, ESL continues to the next watch command sequence.

2. Invoke the subroutine EcsWatch or EcsWatchAndWait, which tells  to start watching for those conditions to be met. For example, you can define a watch command sequence that expresses the following:

"Watch the cursor until it is not located at position row 24, column 6. Next, watch the Operator Information Area until the Input Inhibited indicator is off. Let me know when this is done."