Skip to content

Host Events

To open the Host Event Edit dialog box, click Host Events on the Model menu or click the Edit button on the Event Expression Editor dialog box. Use this dialog box to add, edit, or delete global events to be used in operations throughout the modeling process.

Note

The events described here are used to synchronize the Host Integrator server with the state of the host application. These host synchronization events should be distinguished from the event handling that performs or extends actions in the model file itself.

Defining global host events enables you to rely on a specific order of events encapsulated into one WaitForMultipleEvents command in an operation. This feature enables a more reliable way to synchronize how data is being sent from a character mode host. Since Host Integrator handles only one command per packet of data, the WaitForMultipleEvents command is designed to encapsulate several global events into one unique command in an operation.

Enter a name for your event in the Event name box and choose from the following list of possible global events:

Condition

WaitForCondition event

Events

Event name (WaitForCondition "Entity", "Condition")

Event Description

Waits until the condition is satisfied. The operation containing the event is paused until the condition is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Entity

    Argument type: String

    Specifies the entity on which the condition will be satisfied.

  • Condition

    Click the Edit button to open an editing dialog box for the command argument. Use this dialog box to create a condition that is specific to the entity selected above. For example, create a condition that waits for a certain attribute or attributes to be updated.

Cursor at Attribute

WaitForCursorAtAttribute event

Events

Event name (WaitForCursorAtAttribute "Entity", "Attribute")

Event Description

Begins a wait that is satisfied when the cursor appears in the first coordinate of an attribute on a particular entity. The operation containing the event is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Entity

    Select the entity on which the specified attribute exists.

  • Attribute

    Select the attribute at which the cursor should wait.

Cursor at Recordset Field

WaitForCursorAtRecordsetField event

Events

Event name (WaitForCursorAtRecordset "Entity", "Recordset", "Field")

Event Description

Begins a wait that is satisfied when the specified recordset field data is received from the host. The operation containing the event is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Entity

    Select the entity on which the specified recordset exists.

  • Recordset

    Select the recordset that contains the recordset field.

  • Field

    Select the recordset field at which the cursor should wait. Use the Fields tab to add fields to recordsets.

Cursor Enter Terminal Field

WaitForCursorEnterField event

Events

Event name (WaitForCursorEnterField Row, Column)

Event Description

Begins a wait that is satisfied when the cursor enters the terminal field specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Row

    Argument type: Integer

    The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

  • Column

    Argument type: Integer

    The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

Cursor Enter Position

WaitForCursorEnterPosition event

Events

Event name (WaitForCursorEnterPosition Row, Column)

Event Description

Begins a wait that is satisfied when the cursor enters the position on the terminal screen specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Row

    Argument type: Integer

    The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

  • Column

    Argument type: Integer

    The minimum value is 1 (column 1 is the first column). The minimum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

Cursor Not in Terminal Field

WaitForCursorExitField event

Events

Event name (WaitForCursorExitField Row, Column)

Event Description

Begins a wait that is satisfied when the cursor exits the terminal field specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Row

    Argument type: Integer

    The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

  • Column

    Argument type: Integer

    The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

Cursor Not in Position

WaitForCursorExitPosition event

Events

Event name (WaitForCursorExitPosition Row, Column)

Event Description

Begins a wait that is satisfied when the cursor exits the position on the terminal screen specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

  • Row

    Argument type: Integer

    The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

  • Column

    Argument type: Integer

    The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.

Display String

WaitForDisplayString event

Events

Event name (WaitForDisplayString "String", "Timeout", Row, Column, Relative)

Event Description

Begins a wait that is satisfied by the appearance of the specified string at the row and column coordinates on the terminal screen. The string can be received from the host or typed by the user. The operation is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • String -Argument type: String

The string that can terminate the wait.

  • Timeout -Argument type: String

Specifies an interval of time inHH:MM:SS format that can terminate the wait. If this method times out, an error occurs.

  • Row -Argument type: Integer

The row in which the string must be received.

  • Column -Argument type: Integer

The column in which the string must be received.

  • Relative

Select Yes or No to choose whether or not this event is relative to the other events in the Events list.

Keyboard Enabled

WaitForKeyboardEnabled event

Events

Event name (WaitForKeyboardEnabled Duration)

Event Description

Begins a wait that is satisfied by enabling the keyboard. Use the Duration argument to specify how long to wait before an error occurs. The operation is paused until the wait expires in the specified duration or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Duration -Argument type: Integer

Specifies an interval of time in seconds to wait for the keyboard to be enabled. The default is 1 second.

Host Communication String

WaitForCommString event

Events

Event name (WaitForCommString "Text", "Count")

Event Properties

Begins a wait that is satisfied by the reception of the specified string from the host. The operation containing this event is paused until the wait expires or is satisfied.

For VT and character mode HP hosts, you can wait for datastream sequences that include nonprintable characters using the Model Debug Messages dialog box. As the terminal processes characters, you can copy and paste text into the Text box to configure operations that include raw host communications.

  • Often the best synchronization for VT and HP is in the datastream itself. Coupled with the WaitForMultipleEvents command, it will enable you to be very deterministic about synchronization.

  • Use WaitForCommString only if you are connecting to your host using a host application that uses character mode rather than block mode. This applies to VT and HP character mode models only.

  • If you are connecting directly to a host, use WaitForDisplayString.

  • You can also record a login command list to determine which command is appropriate for your connection.

Event Parameters

  • Text - Argument type: String

    The string received from the host that can terminate the wait.

  • Count -Argument type: Numeric

    Specifies the number of times a string is received from the host. The default value is 1.

Host Communication Silence

WaitForCommSilence event

Event name (WaitForCommSilence Duration)

Event Description

Waits for the absence of data traveling to or from the host. Use the Duration argument to specify how long that period of silence must last before an error occurs.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Duration -Specifies an interval of time to wait for the event to occur in milliseconds. The default is 1000 milliseconds.

Host Connection

WaitForHostConnection event

Event name (WaitForHostConnection)

Event Description

Waits for a host connection to occur.

Event Properties

Enter a name for your event in the Event name box.

Host Disconnect

WaitForHostDisconnect event

Event name (WaitForHostDisconnect)

Event Description

Waits for the lack of a host connection.

Event Properties

Enter a name for your event in the Event name box.

Host Update

WaitHostUpdate event

Event name (WaitHostUpdate TopRow, LeftCol, BottomRow, RightCol, RegionType, Relative)

Event Description

Begins a wait that is satisfied when the specified region on the terminal screen is updated by the host. The operation containing the event is paused until the wait expires or is satisfied.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • TopRow -Argument type: Integer

    The top row of the updated region. The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal screen the Design Tool is emulating.

  • LeftCol - Argument type: Integer

    The left column of the updated region. The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal screen the Design Tool is emulating.

  • BottomRow - Argument type: Integer

    The bootom row of the updated region.

  • RightCol - Argument type: Integer

    The right column of the updated region.

  • RegionType - Specifies what mode to use for the region selected on the terminal screen. Select either the Linear or Rectangular position. The default is Rectangular.

  • Relative - Argument type: Enumeration

    Select whether or not to make this region relative to the cursor's current location by selecting either Yes or No. The default is No.

Milliseconds

WaitMilliseconds event

Event name (WaitMilliseconds Duration)

Event Description

Begins a wait that is satisfied after the specified duration of time in milliseconds.

Event Properties

Enter a name for your event in the Event name box.

Event Parameters

  • Duration - Argument type: Integer

    Specifies an interval of time in milliseconds. The specified event must last this long to satisfy the wait.

New Host Screen

WaitForNewHostScreen event

Event name (WaitForNewHostScreen)

Event Description

Waits for a new screen to be sent from the host.

Event Properties

Enter a name for your event in the Event name box.

To Add a Global Host Event

  1. Click the right arrow button and select global host event. To delete a host event, select it from the Events box and click the minus button.
  2. Under Event properties, type a unique event name in the Event name box.
  3. Under Event parameters, configure any of the options available.
  4. When you have finished defining the event, click OK.

To create a WaitForMultipleEvents command using one or more global events:

  1. Open the Operation Edit dialog box, click the right arrow button, then point to Events, and select WaitForMultipleEvents.
  2. Click the Edit button to open the Host Event Expression Editor dialog box.
  3. After you've created your expression using the operand buttons to string together any global events, click OK.
  4. The new WaitForMultipleEvents command is now included in current operation.