How to update existing CCDT file (AMQCLCHL.TAB) for successful MQueue connection

The client channel definition table ( CCDT) file contains the MQ channels definitions and authentication information used by the client program/application to connect to the queue manager. It is a binary file so we cannot modify using any text editor.

Change in the channel properties like SSLCIPH, USERID, etc. in Queue manager also required change in the CCDT file. Otherwise, it will break the application MQ connection. From IBM MQ v8.0 onwards we can create and modify the CCDT file on client machines directly.

Below are the steps to modify the existing CCDT file.

  1. Set the necessary environment properties
  2. First set the location of CCDT on the client machine. You can do it using the following environment variables:

    • MQCHLLIB – Specify the directory path where the CCDT file is located.
    • MQCHLTAB – Specify the file name of CCDT (a default name – AMQCLCHL.TAB)
    
      #Only path (excluding file name)
      export MQCHLLIB=<directory path where your existing CCDT file is located>
      #Name of CCDT file.
      export MQCHLTAB=AMQCLCHL.TAB
      export MQCLNTCF=<path for your mqclient.ini>
       
  3. Now you can modify the content of the file using “runmqsc -n ”
  4. You can define a new channel using the DEFINE CHANNEL command to create a new channel entry in CCDT or modify the existing channel definition using ALTER CHANNEL command.
    Given below as an example to modify existing channel attribute using ALTER CHANNEL command.

    
      runmqsc -n
      #display channels definition in existing CCDT file
      display channel(*)
      
      #Now you can make changes in the CCDT file, like the below command
      #update SSLCIPH attribute of channel MYMQ.CHANNEL
      
      alter chl(MYMQ.CHANNEL) CHLTYPE(CLNTCONN) SSLCIPH(TLS_RSA_WITH_AES_256_GCM_SHA384)
      
      #Now display the channel definition after modification.
      #You will see the new SSLCIPH is updated successfully.
      
      display chl(MYMQ.CHANNEL)
      
      #exit runmqsc
      exit
      
       

I hope you will find this post helpful. I feel the approach is very helpful when you have many channels on MQ manager but you want a specific channel to connect to your MQ manager from the client machine. You can add only one channel definition to the CCDT file directly in the client machine to connect with the MQ manager.

Comments

Popular posts from this blog

Creating simple Maven multi module project in Java

Tricky Java Questions