Jon Rumsey has a great write-up of this feature on the MQDev Blog, MQ V9 Client Channel Table Enhancements – URL retrieval, where he indicates that the equivalent to the MQCCDTURL environment variable is to use the ChannelDefinitionDirectory attribute in the Channels stanza of mqclient.ini.
My new blog post has a table of all the client environment variables and their equivalents in the mqclient.ini file (an update to a post I wrote in 2014). I noticed that the attribute that Jon refers to, ChannelDefinitionDirectory, is already in use as the equivalent to the MQCHLLIB environment variable.
I know that the MQCHLLIB environment variable only specifies the path to the CCDT, whereas the MQCCDTURL environment variable specifies the whole path and file name. So I wondered whether ChannelDefinitionDirectory was really the direct equivalent.
I had previously been using the following environment variable:-
so I tried out an mqclient.ini file with the following contents as a direct equivalent:-
and was rewarded by the following error in my AMQERR01.LOG:-
AMQ9795: The client channel definition could not be retrieved from its URL, error code (16). EXPLANATION: The client channel definition location was specified as URL 'http://www.mqgem.com/MQGEM.TAB/AMQCLCHL.TAB', however the file could not be retrieved from this location. The error returned was (16) 'HTTP response code said error'. The protocol specific response code was (404). ACTION: Ensure that the URL is reachable and if necessary correct the details provided.
404 is the standard HTTP “not found” response code, and it is not a surprise that it couldn’t find the file since it has concatenated the default AMQCLCHL.TAB file name on the end of what I provided. So it would seem that you need to use both ChannelDefinitionDirectory and ChannelDefinitionFile in the mqclient.ini file to get the equivalent behaviour to the MQCCDTURL environment variable.
With an mqclient.ini file with the following contents:-
CHANNELS: ChannelDefinitionDirectory=http://www.mqgem.com ChannelDefinitionFile=MQGEM.TAB
I was able to successfully connect.