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.
CclECI* pECI = CclECI::instance(); printf( "Server Count = %d\n", pECI-> serverCount() ); printf( "Server1 Name = %s\n", pECI-> serverName( 1 ) ); …
Server Count = 2 Server1 Name = DEVTSERV