ECI CICS Server Information and Connection Status

The ECI COM class provides the names and descriptions of CICS® servers configured in the Gateway initialization file. The Connect COM class provides methods for querying the availability of a particular CICS server.

Object variables are declared as before, this time we use ECI, Connect and Flow COM classes:
  'Declare object variables
  Dim ECI As CclOECI
  Dim Connect As CclOConn
  Dim Flow As CclOFlow
On user request, the objects are created, and a list of CICS server names and their descriptions is constructed:
  Sub ECIServers_Click()
      Dim I as Integer

      'Instantiate CICS ECI objects
      Set ECI = New CclOECI
      Set Connect = New CclOConn
      Set Flow = New CclOFlow

      'List CICS server information
      For I = 1 To ECI.ServerCount
          List1.AddItem ECI.ServerName(I)
          List1.AddItem ECI.ServerDesc(I)
      Next
   End Sub
A synchronous status call to the first server is made, and the results of the call displayed in a text field:
      Connect.Details ECI.ServerName(1)
      Connect.Status Flow
      Text1.Text = Connect.ServerStatusText