+

Search Tips | Advanced Search

Set up the IBM MQ environment

Before we use the client connection to connect to a queue manager, you must set up the IBM MQ environment.

Note: This step is not necessary when using IBM MQ classes for .NET in server bindings mode. The .NET programming interface allows you to use the NMQ_MQ_LIB customization value but also includes a class MQEnvironment. This class allows you to specify details that are to be used during the connection attempt, such as those in the following list:

For full information about the MQEnvironment class, see MQEnvironment.NET class To specify the channel name and host name, use the following code:
MQEnvironment.Hostname = "host.domain.com";
MQEnvironment.Channel  = "client.channel";
By default, the clients attempt to connect to a IBM MQ listener at port 1414. To specify a different port, use the code:
MQEnvironment.Port = nnnn;