Shutting down a single queue manager for IBM MQ for IBM i

Use this information to understand the three types of shutdown.

In the procedures that follow, we use a sample queue manager name of QMgr1 and a sample subsystem name of SUBX. Replace these names with your own values if necessary.


Planned shutdown

Planned shutdown of a queue manager on IBM i
  1. Before shutdown, execute:
    RCDMQMIMG OBJ(*ALL) OBJTYPE(*ALL) MQMNAME(QMgr1) DSPJRNDTA(*YES)
    
  2. To shut down the queue manager, execute:
    ENDMQM MQMNAME(QMgr1) OPTION(*CNTRLD)
    
    If QMgr1 does not end, the channel or applications are probably busy.
  3. If we must shut down QMgr1 immediately, execute the following:
    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(15)
    


Unplanned shutdown

  1. To shut down the queue manager, execute:
    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    
    If QMgr1 does not end, the channel or applications are probably busy.
  2. For to shut down QMgr1 immediately, execute the following:
    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(15)
    


Shut down under abnormal conditions

  1. To shut down the queue manager, execute:
    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    
    If QMgr1 does not end, continue with step 3 providing that:

    • QMgr1 is in its own subsystem, or
    • We can end all queue managers that share the same subsystem as QMgr1. Use the unplanned shutdown procedure for all such queue managers.

  2. When you have taken all the steps in the procedure for all the queue managers sharing the subsystem ( SUBX in our examples), execute:
    ENDSBS SUBX *IMMED
    
    If this command fails to complete, shut down all queue managers, using the unplanned shutdown procedure, and perform an IPL on your machine. Warning: Do not use ENDJOBABN for IBM MQ jobs that fail to end as result of ENDJOB or ENDSBS, unless we are prepared to perform an IPL on your machine immediately after.
  3. Start the subsystem by executing:
    STRSBS SUBX
    
  4. Shut down the queue manager immediately, by executing:
    ENDMQM MQMNAME(QMgr1) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(10)
    
  5. Restart the queue manager by executing:
    STRMQM MQMNAME(QMgr1)
    
    If this fails, and you:

    • Have restarted your machine by performing an IPL, or
    • Have only a single queue manager

    Tidy up IBM MQ shared memory by executing:

    ENDMQM MQMNAME(*ALL) OPTION(*IMMED)
    ENDCCTJOB(*YES) TIMEOUT(15)
    
    before repeating step 5.

    If the queue manager restart takes more than a few seconds, IBM MQ adds status messages intermittently to the job log detailing the startup progress.

    If you still have problems restarting your queue manager, contact IBM support. Any further action you might take could damage the queue manager, leaving IBM MQ unable to recover.

Parent topic: Quiescing IBM MQ for IBM i