You may have read an earlier post where we described being able to determine what version of CCDT you had in your hand.
How often have you had a CCDT file in your hand and wondered what version it was and whether you can give it to some of your known back-level client machines to use.
MQSCX can help you determine this. Open up your CCDT using the mqscx -n mode and then you can quite simply display the version number of all your client channels therein.
What you may not have realised from that post however, was that not only can MQSCX help to investigate what version number your CCDT is made for, it can also make a CCDT for the correct version as well. If you have back-level clients, it can be a real pain having to keep a queue manager of the same level around just to be able to create a CCDT that it will understand. Well, you can ditch that queue manager and use MQSCX instead. It’s really easy to do as well.
To use MQSCX to work with a CCDT, you need to use the -n parameter. This will then look for the CCDT file in the location specified by the MQCHLLIB and MQCHLTAB environment variables unless you provide the -t parameter to give it a specific file name. If one doesn’t exist, it will make a new one for you, and if one does exist it will read it and allow you to update it. In order to control the version of CCDT you are creating, you should additionally use the -V parameter which allows you to specify the version the CCDT file should be written as.
Here’s an example, run the MQSCX program like this:
mqscx -n -t C:\MQGem\CCDT\MQGEM.TAB -V7.0
And then you can use it to make DISPLAY, ALTER and DELETE commands.
MQSCX Extended MQSC Program – Version 8.0.0
CCDT commands directed to file ‘C:\MQGem\CCDT\MQGEM.TAB’
Licenced to Paul Clarke
Licence Location: Head Office
[12:02:10] DISPLAY CHANNEL(*) CONNAME VERSION
Total display responses – Received:3
As you can see, at the moment all the channels in this CCDT are at V8.0 which means my V7.0 client won’t be able to read them. I need to make a change to each record to ensure MQSCX will write it out at version V7.0 as I have indicated on my start command. Helpfully, I can do that in one single command:-
This makes no actual change to the attributes of the channel definition, but does ‘touch’ each record to ensure that it gets the new version. Displaying the records again as above will show that the version number for each channel mentioned by the ALTER command (in this example all of them), now indicates it is at version V7.0, just what my back-level client application needs.
Exiting MQSCX and re-running it will show you that this earlier version of the CCDT has indeed been hardened.
Note that if you had been using some attributes introduced in later versions than V7.0, this information would be lost when altering the channel definition to be an earlier version.
If you’d like to try out MQSCX, please email email@example.com to request a trial licence.