Example client connection using CCDT
An example of creating a client connection on the appliance and downloading the CCDT to the client.
A queue manager stores client connection channel information in a client channel definition table (CCDT). This table is updated whenever a client connection channel is defined or altered. An IBM® MQ client application uses the client channel definition table (CCDT) to determine the channel definitions and authentication information to use to connect to a queue manager. For a client application to use the CCDT, it must either be copied to the client machine or the file should be placed in a location from where the client can access it. On the appliance, the file needs to be copied to a directory from where it can be downloaded.
- Run the following commands at the
MQCLIprompt on the appliance to create the required IBM MQ objects and a user account under which the client connection is established:usercreate -u mquser -p passw0rd crtmqm QM1 strmqm QM1 runmqsc QM1 DEFINE QLOCAL('Q1') DEFINE CHANNEL('CLNTCHL') CHLTYPE(SVRCONN) TRPTYPE(TCP) DEFINE CHANNEL('CLNTCHL') CHLTYPE(CLNTCONN) QMNAME('QM1') CONNAME('<IP_ADDRESS>(2323)') TRPTYPE(TCP) DEFINE LISTENER('L1') TRPTYPE(TCP) PORT(2323) START LISTENER('L1') END - Set a channel authentication rule to accept connection from the IP address of your client
system:
runmqsc QM1 SET CHLAUTH ('CLNTCHL') TYPE(ADDRESSMAP) ADDRESS(<client_IP_ADDRESS>) MCAUSER('mquser') - Grant access to the user account 'mquser' so that it can connect to and inquire on the queue
manager, and also has the authority to put, get, inq, and browse the queue
Q1:
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('mquser') AUTHADD(CONNECT,INQ) SET AUTHREC PROFILE('Q1') OBJTYPE(QUEUE) PRINCIPAL('mquser') AUTHADD(PUT,GET,INQ,BROWSE)
- Run the following command on the appliance to generate the AMQCLCHL.TAB
file in the mqbackup:///
URI:
rcrmqobj -m QM1 -t clchltabA file named QM1_AMQCLCHL.TAB is created in mqbackup:///.
- Use the appliance web UI to download the CCDT file to the directory of your choice on the
client computer.

- You can take the following steps to run a sample application using the downloaded CCDT on the
client computer:
- On the Windows client computer, set the MQSAMP_USER_ID environment variable to identify the user that is running the sample programs.
- Set the MQCHLLIB and MQCHLTAB environment variables to specify the location and name of the
CCDT.
