Creating a client-connection channel on the IBM MQ MQI client using MQSERVER
You can define a client-connection channel on a client workstation by using the MQSERVER environment variable.
About this task
You can use the MQSERVER environment variable to specify a simple definition of a client-connection channel. It is simple in the sense that you can specify only a few attributes of the channel using this method.
If you use the MQSERVER environment variable to define the channel between your IBM® MQ MQI client machine and a server machine, this is the only channel available to your application, and no reference is made to the client channel definition table (CCDT).
If the MQCONN or MQCONNX request specifies a queue manager other than the one the listener is connected to, or if the MQSERVER parameter TransportType is not recognized, the MQCONN or MQCONNX request fails with return code MQRC_Q_MGR_NAME_ERROR.
export MQSERVER=CHANNEL1/TCP/'9.20.4.56(2002)'
export MQSERVER=CHANNEL1/LU62/BOX99
All MQCONN or MQCONNX requests then attempt to use the channel you have defined unless an MQCD structure has been referenced from the MQCNO structure supplied to MQCONNX, in which case the channel specified by the MQCD structure takes priority over any specified by the MQSERVER environment variable.
The MQSERVER environment variable takes priority over any client channel definition pointed to by the MQCHLLIB and MQCHLTAB environment variables.
Procedure
Example
- On AIX and Linux:
export MQSERVER=CHANNEL1/TCP/'MCID66499'
- On Windows:
SET MQSERVER=CHANNEL1/TCP/MCID66499
- On Windows:
SET MQSERVER=CHANNEL1/TCP/9.20.4.56 SET MQSERVER=CHANNEL1/NETBIOS/BOX643
- On AIX and Linux:
whereexport MQSERVER=CHANNEL1/TCP/'9.20.4.56' export MQSERVER=CHANNEL1/LU62/BOX99
BOX99
is the LU 6.2 ConnectionName. - On IBM i:
ADDENVVAR ENVVAR(MQSERVER) VALUE('CHANNEL1/TCP/9.20.4.56(1416)')
On the IBM MQ MQI client, all MQCONN or MQCONNX requests then attempt to use the channel you have defined, unless the channel is overridden in an MQCD structure referenced from the MQCNO structure supplied to MQCONNX.