Create Both Server and Client Channels

 

  1. Create and start a queue manager

  2. On the server machine, define a channel of type server-connection. For example:
    DEFINE CHANNEL(CHANNELNAME) 
         + CHLTYPE(SVRCONN) 
         + TRPTYPE(TCP) 
         + DESCR('Server-connection to Client_2')
    

    This channel definition is associated with the queue manager running on the server.

  3. Define a channel with the same name and a channel type of client-connection.

    You must state the connection name (CONNAME). For TCP/IP this is the network address of the server machine. It is also advisable to specify the queue manager name (QMNAME) to which you want your WebSphere MQ application, running in the client environment, to connect.

    For example:

    DEFINE CHANNEL(CHANNELNAME) CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
    CONNAME(9.20.4.26) QMNAME(LONDON) DESCR('Client-connection to Server_2')
    

    This channel definition is stored in a file called the client channel definition table, which is associated with the queue manager running on the server. The client channel definition table can contain more than one client-connection channel definition.

 

Accessing client-connection channel definitions

If the client channel definition table on the server machine cannot be accessed from the client machine as a shared file, copy the client channel definition table to the client machine as a binary file. On the client machine, you can then use the environment variables, MQCHLLIB and MQCHLTAB, to specify the location and name of the file containing the client channel definition table. The WebSphere MQ client uses the values of these environment variables to access the client channel definition table. See MQCHLLIB and MQCHLTAB for more information.

For example, you can set the environment variables on a UNIX system by typing:

export MQCHLLIB=/opt/mqm/qmgrs/QUEUEMANAGERNAME/@ipcc
export MQCHLTAB=AMQCLCHL.TAB

As an alternative to using environment variables MQCHLLIB and MQCHLTAB on Windows systems with Active Directory, you can use the setmqscp control command to publish the client-connection channel definitions in Active Directory. For information about this command and its syntax, see the WebSphere MQ System Administration Guide.

Note:
If the MQSERVER environment variable is set, a WebSphere MQ client uses the client-connection channel definition specified by MQSERVER in preference to any definitions in the client channel definition table.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.