Bootstrap FreeKB - IBM MQ - Update topic using the alter topic command
IBM MQ - Update topic using the alter topic command

Updated:   |  IBM MQ articles

The alter topic command can be used to alter a topic. In this example, the topic named TOPIC01 in the queue manager named MANAGER01 is updated to have a description of "Hello World".

AVOID TROUBLE

When a value is a string and contains one or more white spaces, the value must be wrapped in quotes. In this example, Hello World is wrapped in quotes.

echo "alter topic (TOPIC01) DESCR ('Hello World')" | runmqsc MANAGER01

 

If the topic is successfully altered, something like this should be displayed.

AMQ8691I: IBM MQ topic changed.

 

The display topic command can be used to view the configuration of the topic.

echo "display topic (TOPIC01) DESCR" | runmqsc MANAGER01

 

Something like this should be returned.

AMQ8633I: Display topic details.
   TOPIC(TOPIC01)                          TYPE(LOCAL)
   TOPICSTR(events/updates)
   DESCR(Hello World)
   CLUSTER( )                              CLROUTE(DIRECT)
   DURSUB(ASPARENT)                        PUB(ENABLED)
   SUB(ENABLED)                            DEFPSIST(ASPARENT)
   DEFPRTY(ASPARENT)                       DEFPRESP(ASPARENT)
   ALTDATE(2019-01-07)                     ALTTIME(14.55.34)
   PMSGDLV(ASPARENT)                       NPMSGDLV(ASPARENT)
   PUBSCOPE(ASPARENT)                      SUBSCOPE(ASPARENT)
   PROXYSUB(FIRSTUSE)                      WILDCARD(PASSTHRU)
   MDURMDL( )                              MNDURMDL( )
   MCAST(ASPARENT)                         COMMINFO( )
   USEDLQ(ASPARENT)                        CUSTOM( )

 


Alter multiple fields

In this example, both DESCR and PUB are updated simultaneously.

echo "alter topic (TOPIC01) DESCR ('Hello World') PUB (ENABLED)" | runmqsc MANAGER01



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 2d74a3 in the box below so that we can be sure you are a human.