Changing the channel name

Viewed 204

How do I change the name of an existing channel. My client has informed me that they are changing the channel but keeping the CONNAME the same. I am not able to use the ALTER function. Should I DELETE and re-DEFINE the channel?

1 Answers

IBM MQ does not have a RENAME action, so you would need to DEFINE a new channel and once you are no longer using the old channel DELETE it.

To make it easier you can use the LIKE verb to copy most (if not all) of the parameters of the old channel to the new channel, for example:

DEFINE CHL(NEW.CHL) CHLTYPE(SDR) LIKE(OLD.CHL)

In the above case the NEW.CHL will have the same values as OLD.CHL for things like XMITQ, CONNAME, etc.

Related