Finding potential servers

Information about the CICS® servers that can be used by a Client application is defined in the CICS Transaction Gateway configuration file. See Configuration in the CICS Transaction Gateway: Administration book for your operating system, for more information. The existence of such a definition doesn't guarantee availability of a server.

The ECI object CclECI provides access to this server information through its serverCount, serverDesc, and serverName methods.

Unless the ECI class has been subclassed, its unique instance is found using the class method instance as in the following example:
CclECI* pECI = CclECI::instance();
printf( "Server Count = %d\n", pECI-> serverCount() );
printf( "Server1 Name = %s\n", pECI-> serverName( 1 ) );
  …
Typical output produced:
Server Count = 2
Server1 Name = DEVTSERV