IBM MQ V9.1 System Administrator cheat sheet
IBM MQ V9.1 System Administrator · Keep the key ideas within reach.
Administration
Queue manager lifecycle: crtmqm creates the queue manager and its filesystem under the data directory; strmqm starts it; endmqm -w (wait), -i (immediate), or -p (permit) controls shutdown behaviour; dltmqm removes it only after it is ended.
endmqm -i terminates channels and applications without waiting; endmqm -p lets current units of work finish but refuses new ones; plain endmqm waits for connected applications, so a hung app blocks shutdown until -i is used.
DISPLAY commands: dspmq shows local queue managers and status; dspmq -m QMGR -o all shows status, installation, and directory; runmqsc DISPLAY QUEUE(QUEUE) returns up to 20 attributes per line, so use a specific attribute name for exact values.
DISPLAY QSTATUS TYPE(QUEUE) shows CURDEPTH, IPPROCS, OPPROCS, and LGETTIME/LPUTTIME (last get/put); DISPLAY QSTATUS TYPE(HANDLE) lists processes holding the queue open, which identifies blocking consumers.
MQSC commands are case-insensitive but names are not; a trailing parenthesis in the command terminator (e.g. DEFINE QLOCAL(DLQ) is fine) is optional; use * to run a command against all matching objects, e.g. DISPLAY QUEUE(*) CURDEPTH.
runmqsc reads commands from stdin or a file; to script, pipe a file into runmqsc QMGR. To run a single command from a shell, use echo "DISPLAY QMGR" | runmqsc QMGR. Always check the AMQ return code in the output.
Backup strategy: queue manager data is only consistent when the queue manager is ended; back up the data directory and logs together while stopped, or use media image (rcdmqimg) plus log replay for online recovery.
rcdmqimg -m QMGR -t all /path records a media image of objects into the log; rcrmqobj -m QMGR -t all restores objects from recorded images. Media images are required when logs are reused or truncated.
Dead letter queue: the queue manager writes undeliverable messages to the queue named by the DEADQ queue-manager attribute; set it with ALTER QMGR DEADQ(DLQ) and create DLQ with DEFINE QLOCAL(DLQ) MAXDEPTH large enough, otherwise messages are discarded.
Configuration
DEFINE QLOCAL sets queue attributes at creation; ALTER QLOCAL changes them later. Key attributes: MAXDEPTH (default 5000), MAXMSGL (default 4 MB), DEFPSIST (default NO), PUT/GET enabled flags, and BACKOUTTHRESHOLD for backout counting.
Persistence is set per message via the MQMD Persistence field; DEFPSIST only supplies the default when the application passes MQPER_PERSISTENCE_AS_Q_DEF. Non-persistent messages survive a queue manager restart only if the queue is defined with NPMCLASS(HIGH).
Channel pairs: a sender (SDR) on one queue manager pairs with a receiver (RCVR) on the other for one-way flow; a server (SVR) pairs with a requester (RQSTR); a cluster sender (CLUSSDR) and cluster receiver (CLUSRCVR) join a cluster. Both ends must agree on channel name and transport type.
CONNAME on the sender side must point at the listener host and port of the partner; the receiver side needs a listener started with runmqlsr or a SYSTEM.LISTENER.TCP definition (default port 1414).
Transmission queues: remote queue definitions (DEFINE QREMOTE) specify RNAME, RQMNAME, and XMITQ; the sender channel must reference the same XMITQ via its XMITQ attribute. A missing XMITQ leaves messages stuck on SYSTEM.DEAD.LETTER or fails the put.
Triggering: DEFINE QLOCAL(APP.Q) TRIGGER INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE) TRIGTYPE(FIRST) PROCESS(PROC); the PROCESS object supplies APPLICID (program to start). TRIGTYPE options are FIRST, EVERY, DEPTH, and NONE.
Cluster membership: ALTER QMGR REPOS(YES) makes a full repository; a partial repository joins via a CLUSRCVR channel whose CLUSTER attribute names the cluster. Queues become cluster-visible with CLUSTER(NAME) and optionally CLUSNL.
Multi-instance queue managers: create the queue manager, then add a shared data directory and a standby instance with the same name on another host; a network filesystem holds the data and logs, and only one instance is active at a time.
Troubleshooting
Check the queue manager error logs first: AMQERR01.LOG in the queue manager errors directory holds recent entries; AMQERR00.LOG, .01, .02 rotate oldest to newest, with AMQERR01.LOG the current file. On distributed platforms they sit under /var/mqm/qmgrs/QMGR/errors.
Channel status: DISPLAY CHSTATUS(channel) shows STATUS (RUNNING, STOPPED, RETRYING, BINDING), SUBSTATE (e.g. MQGET, SENDING), and the last message sequence number. Compare CURSEQNO on both ends to detect lost or duplicated messages.
Channel retry: short retry (default 60 s interval, 10 tries) then long retry (default 1200 s interval, 999999999 tries), configured by SHORTRTY/SHORTTMR and LONGRTY/LONGTMR on the channel. STOP CHANNEL(channel) MODE(FORCE) clears a hung channel.
Messages on the XMITQ but no channel running means the sender is stopped or retrying; DISPLAY CHSTATUS and the error log show the reason. Messages on SYSTEM.DEAD.LETTER.QUEUE with a dead-letter header (MQDLH) carry the original destination and failure reason.
Common reason codes: 2035 MQRC_NOT_AUTHORIZED, 2058 MQRC_Q_MGR_NAME_ERROR, 2059 MQRC_Q_MGR_NOT_AVAILABLE, 2085 MQRC_UNKNOWN_OBJECT_NAME, 2042 MQRC_OBJECT_IN_USE, 2053 MQRC_Q_FULL, 2051 MQRC_OBJECT_ALREADY_EXISTS, 2016 MQRC_GET_INHIBITED.
Queue full (2053) is diagnosed with DISPLAY QLOCAL(QUEUE) MAXDEPTH and DISPLAY QSTATUS CURDEPTH; remedies include consuming messages, increasing MAXDEPTH, or adding a backout path. GET(DISABLED) returns 2016 on get attempts.
Trace: strmqtrc -m QMGR -t all enables trace, endmqtrc stops it; output lands in the trace directory. Use it only for hard problems because it is verbose and impacts performance.
A channel in BINDING or RETRYING with no error in the log often means network or listener problems; test connectivity to CONNAME with telnet and confirm the listener is running with DISPLAY LSSTATUS(*) STATUS(RUNNING).
Security
Authorization is controlled by OAM (object authority manager) on distributed platforms. SET AUTHREC OBJTYPE(QMGR) or OBJTYPE(QUEUE) grants principals or groups authorities such as CONNECT, INQ, PUT, GET, BROWSE, SET, and CHG.
SET AUTHREC PROFILE(APP.Q) OBJTYPE(QUEUE) PRINCIPAL('appuser') AUTHADD(PUT,GET,INQ) adds authorities; AUTHREM removes them. Use DISPLAY AUTHREC to review and ALTER QMGR AUTHENABLE to toggle checks.
Channel authentication records (CHLAUTH) filter inbound connections before authentication: SET CHLAUTH('CHANNEL') TYPE(ADDRESSMAP) ADDRESS('10.0.0.*') MCAUSER('appuser'); TYPE(BLOCKUSER) blocks specific users; TYPE(SSLPEERMAP) maps certificate DNs.
CHLAUTH rules are evaluated in order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, then BLOCKUSER. The first matching rule applies. SET CHLAUTH(*) TYPE(ANY) ACTION(REPLACE) with a catch-all block is a common hardening step.
TLS: define a key repository with runmqakm or runmqckm, set the queue manager SSLKEYR attribute to the .kdb stem, and configure SSLCIPH on both channel ends; the cipher spec must match and the partner certificate must be trusted in the key repository.
SSL/TLS peer validation: SSLPEER on the channel restricts the distinguished name of the partner certificate; CERTLABL selects which certificate the channel presents from the key repository.
Connection authentication: ALTER QMGR CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks at connection time; the AUTHINFO object's ADOPTCTX(YES) makes the supplied user ID the context used for authority checks.
Security events: enable with ALTER QMGR AUTHOREV(ENABLED) for authorization failures, CHADEV for channel events, and INHIBTEV for inhibit events; events are written to SYSTEM.ADMIN.QUEUE (or the configured event queue) for monitoring.
IBM MQ Advanced adds TLS 1.3 support and certificate revocation checking; MQ V9.1 on distributed platforms supports TLS 1.2 as the baseline. Keep the key repository permissions restricted to the mqm group.
Administration
dspmq -o installation,status lists queue managers with installation name and running state; -m QMGR narrows to one.
DISPLAY QMGR ALL returns queue-manager attributes; specific attributes such as DEADQ, CHLEV, and MAXHANDS can be queried individually.
runmqsc QMGR < commands.txt executes a command file non-interactively; the exit code reflects syntax errors, not command failures.
rcdmqimg records object definitions into the log so log replay can restore them after log truncation.
endmqm -w is the default wait mode; -i is forced shutdown and should be a last resort because it can leave in-doubt transactions.
DISPLAY QSTATUS TYPE(HANDLE) identifies which process holds a queue open, useful when a queue cannot be cleared.
CLEAR QLOCAL(QUEUE) removes all messages from a queue but does not reset the queue's depth counters for in-flight units of work.
Configuration
DEFINE CHANNEL(SDR.TO.PARTNER) CHLTYPE(SDR) CONNAME('host(1414)') XMITQ(XMIT.Q) TRPTYPE(TCP) defines a sender channel.
DEFINE QREMOTE(RQ) RNAME(TARGET.Q) RQMNAME(PARTNER.QM) XMITQ(XMIT.Q) routes puts to a remote queue manager.
DEFINE QLOCAL(APP.Q) TRIGGER INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE) TRIGTYPE(FIRST) PROCESS(P1) enables first-message triggering.
MAXMSGL on the queue manager and channel must be at least the message size; the channel MAXMSGL defaults to the queue manager value.
ALTER QMGR REPOS(YES) makes a queue manager a full repository in a cluster; partial repositories join through a CLUSRCVR channel.
Listener: DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR), then START LISTENER(TCP.LISTENER).
Channel auto-definition is controlled by CHAD on the queue manager; disabling it prevents unknown partner channels from being created automatically.
Troubleshooting
AMQERR01.LOG is the current error log; older entries rotate to AMQERR02.LOG and AMQERR03.LOG.
DISPLAY CHSTATUS(CHL) ALL shows STATUS, SUBSTATE, CURSEQNO, and LSTMSGDA for diagnosing channel flow.
Reason code 2035 is an authorization failure; check SET AUTHREC and CHLAUTH rules for the user ID.
Reason code 2059 means the queue manager is not available: check dspmq status and the listener.
STOP CHANNEL(CHL) MODE(FORCE) terminates a channel that will not stop normally, but can leave in-doubt messages.
strmqtrc -t all -m QMGR starts trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
A message on SYSTEM.DEAD.LETTER.QUEUE with an MQDLH header records the original destination queue and the failure reason code.
Security
SET AUTHREC OBJTYPE(QUEUE) PROFILE(APP.Q) PRINCIPAL('user') AUTHADD(PUT,GET) grants queue authorities to a principal.
SET CHLAUTH('CHL') TYPE(ADDRESSMAP) ADDRESS('10.0.0.*') MCAUSER('appuser') maps incoming addresses to a user ID.
CHLAUTH evaluation order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match wins.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both channel ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
crtmqm -q QMGR creates a queue manager without starting it; -lp sets the log primary count and -ls the log secondary count.
strmqm -x QMGR starts in the background and returns immediately; without -x the command waits for startup to finish.
dltmqm QMGR deletes a queue manager and its data; it fails if the queue manager is running.
DISPLAY QLOCAL(*) CURDEPTH lists current depths for all local queues; CURDEPTH is the number of messages on the queue.
rcdmqimg -m QMGR -t obj /backup records media images; rcrmqobj restores objects from those images.
The DEADQ queue-manager attribute names the dead letter queue; unset means undeliverable messages are discarded.
DISPLAY QMSTATUS shows queue-manager status including CONNS and the current log file.
Configuration
DEFINE QLOCAL(Q) MAXDEPTH(100000) MAXMSGL(104857600) DEFPSIST(YES) sets depth, message size, and persistence defaults.
NPMCLASS(HIGH) on a local queue lets non-persistent messages survive a queue manager restart.
A sender channel's XMITQ must be a local queue; a remote queue definition's XMITQ must match the sender channel's XMITQ.
TRIGTYPE(FIRST) fires one trigger message when the queue transitions from empty to non-empty; EVERY fires on each message.
CLUSRCVR channels carry the CLUSTER attribute that makes a queue manager a cluster member.
A listener is started with START LISTENER(name) after DEFINE LISTENER(name) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR).
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG in the queue manager errors directory is the first place to look for channel and startup failures.
DISPLAY CHSTATUS shows STATUS(RUNNING, RETRYING, STOPPED, BINDING) and SUBSTATE such as MQGET or SENDING.
CURSEQNO mismatch between channel ends indicates lost or duplicated messages; compare with DISPLAY CHSTATUS on both sides.
SHORTRTY/SHORTTMR and LONGRTY/LONGTMR govern channel retry intervals and counts.
2035 MQRC_NOT_AUTHORIZED points to OAM or CHLAUTH rules; 2053 MQRC_Q_FULL points to MAXDEPTH or a stalled consumer.
A stopped sender channel leaves messages on the transmission queue; DISPLAY QLOCAL(XMITQ) CURDEPTH confirms.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
Security
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('user') AUTHADD(CONNECT,INQ) controls queue-manager-level access.
SET CHLAUTH('CHL') TYPE(BLOCKUSER) USERLIST('nobody') blocks specific user IDs from connecting.
CHLAUTH rules are evaluated in order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match applies.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
dspmq shows queue manager status; dspmq -m QMGR -o all adds installation and directory details.
endmqm -w waits for connected applications; -i is immediate and -p permits shutdown after current work.
DISPLAY QSTATUS TYPE(QUEUE) reports CURDEPTH, IPPROCS, and OPPROCS for a queue.
DISPLAY QSTATUS TYPE(HANDLE) lists processes holding a queue open, which identifies blocking consumers.
runmqsc QMGR < file.txt runs commands from a file; check the AMQ return codes in the output.
rcdmqimg records media images into the log; rcrmqobj restores objects from those images.
The DEADQ attribute names the dead letter queue; undeliverable messages go there instead of being discarded.
Configuration
DEFINE QLOCAL sets MAXDEPTH, MAXMSGL, DEFPSIST, and trigger attributes at creation; ALTER changes them later.
A remote queue definition needs RNAME, RQMNAME, and XMITQ; the sender channel must use the same XMITQ.
Sender and receiver channel ends must agree on channel name and transport type.
CONNAME on the sender points at the partner host and listener port, default 1414.
ALTER QMGR REPOS(YES) makes a full repository; partial repositories join via CLUSRCVR channels.
DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) followed by START LISTENER starts the listener.
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG is the current error log; older entries rotate to AMQERR02.LOG and AMQERR03.LOG.
DISPLAY CHSTATUS(CHL) ALL shows STATUS, SUBSTATE, CURSEQNO, and the last message date for diagnosis.
Reason code 2035 is an authorization failure; check SET AUTHREC and CHLAUTH rules for the user ID.
Reason code 2059 means the queue manager is not available: check dspmq status and the listener.
STOP CHANNEL(CHL) MODE(FORCE) terminates a channel that will not stop normally, but can leave in-doubt messages.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
A message on SYSTEM.DEAD.LETTER.QUEUE with an MQDLH header records the original destination queue and the failure reason code.
Security
SET AUTHREC OBJTYPE(QUEUE) PROFILE(APP.Q) PRINCIPAL('user') AUTHADD(PUT,GET) grants queue authorities to a principal.
SET CHLAUTH('CHL') TYPE(ADDRESSMAP) ADDRESS('10.0.0.*') MCAUSER('appuser') maps incoming addresses to a user ID.
CHLAUTH evaluation order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match wins.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both channel ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
crtmqm -q QMGR creates a queue manager without starting it; -lp sets the log primary count and -ls the log secondary count.
strmqm -x QMGR starts in the background and returns immediately; without -x the command waits for startup to finish.
dltmqm QMGR deletes a queue manager and its data; it fails if the queue manager is running.
DISPLAY QLOCAL(*) CURDEPTH lists current depths for all local queues; CURDEPTH is the number of messages on the queue.
rcdmqimg -m QMGR -t obj /backup records media images; rcrmqobj restores objects from those images.
The DEADQ queue-manager attribute names the dead letter queue; unset means undeliverable messages are discarded.
DISPLAY QMSTATUS shows queue-manager status including CONNS and the current log file.
Configuration
DEFINE QLOCAL(Q) MAXDEPTH(100000) MAXMSGL(104857600) DEFPSIST(YES) sets depth, message size, and persistence defaults.
NPMCLASS(HIGH) on a local queue lets non-persistent messages survive a queue manager restart.
A sender channel's XMITQ must be a local queue; a remote queue definition's XMITQ must match the sender channel's XMITQ.
TRIGTYPE(FIRST) fires one trigger message when the queue transitions from empty to non-empty; EVERY fires on each message.
CLUSRCVR channels carry the CLUSTER attribute that makes a queue manager a cluster member.
A listener is started with START LISTENER(name) after DEFINE LISTENER(name) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR).
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG in the queue manager errors directory is the first place to look for channel and startup failures.
DISPLAY CHSTATUS shows STATUS(RUNNING, RETRYING, STOPPED, BINDING) and SUBSTATE such as MQGET or SENDING.
CURSEQNO mismatch between channel ends indicates lost or duplicated messages; compare with DISPLAY CHSTATUS on both sides.
SHORTRTY/SHORTTMR and LONGRTY/LONGTMR govern channel retry intervals and counts.
2035 MQRC_NOT_AUTHORIZED points to OAM or CHLAUTH rules; 2053 MQRC_Q_FULL points to MAXDEPTH or a stalled consumer.
A stopped sender channel leaves messages on the transmission queue; DISPLAY QLOCAL(XMITQ) CURDEPTH confirms.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
Security
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('user') AUTHADD(CONNECT,INQ) controls queue-manager-level access.
SET CHLAUTH('CHL') TYPE(BLOCKUSER) USERLIST('nobody') blocks specific user IDs from connecting.
CHLAUTH rules are evaluated in order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match applies.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
dspmq shows queue manager status; dspmq -m QMGR -o all adds installation and directory details.
endmqm -w waits for connected applications; -i is immediate and -p permits shutdown after current work.
DISPLAY QSTATUS TYPE(QUEUE) reports CURDEPTH, IPPROCS, and OPPROCS for a queue.
DISPLAY QSTATUS TYPE(HANDLE) lists processes holding a queue open, which identifies blocking consumers.
runmqsc QMGR < file.txt runs commands from a file; check the AMQ return codes in the output.
rcdmqimg records media images into the log; rcrmqobj restores objects from those images.
The DEADQ attribute names the dead letter queue; undeliverable messages go there instead of being discarded.
Configuration
DEFINE QLOCAL sets MAXDEPTH, MAXMSGL, DEFPSIST, and trigger attributes at creation; ALTER changes them later.
A remote queue definition needs RNAME, RQMNAME, and XMITQ; the sender channel must use the same XMITQ.
Sender and receiver channel ends must agree on channel name and transport type.
CONNAME on the sender points at the partner host and listener port, default 1414.
ALTER QMGR REPOS(YES) makes a full repository; partial repositories join via CLUSRCVR channels.
DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) followed by START LISTENER starts the listener.
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG is the current error log; older entries rotate to AMQERR02.LOG and AMQERR03.LOG.
DISPLAY CHSTATUS(CHL) ALL shows STATUS, SUBSTATE, CURSEQNO, and the last message date for diagnosis.
Reason code 2035 is an authorization failure; check SET AUTHREC and CHLAUTH rules for the user ID.
Reason code 2059 means the queue manager is not available: check dspmq status and the listener.
STOP CHANNEL(CHL) MODE(FORCE) terminates a channel that will not stop normally, but can leave in-doubt messages.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
A message on SYSTEM.DEAD.LETTER.QUEUE with an MQDLH header records the original destination queue and the failure reason code.
Security
SET AUTHREC OBJTYPE(QUEUE) PROFILE(APP.Q) PRINCIPAL('user') AUTHADD(PUT,GET) grants queue authorities to a principal.
SET CHLAUTH('CHL') TYPE(ADDRESSMAP) ADDRESS('10.0.0.*') MCAUSER('appuser') maps incoming addresses to a user ID.
CHLAUTH evaluation order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match wins.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both channel ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
crtmqm -q QMGR creates a queue manager without starting it; -lp sets the log primary count and -ls the log secondary count.
strmqm -x QMGR starts in the background and returns immediately; without -x the command waits for startup to finish.
dltmqm QMGR deletes a queue manager and its data; it fails if the queue manager is running.
DISPLAY QLOCAL(*) CURDEPTH lists current depths for all local queues; CURDEPTH is the number of messages on the queue.
rcdmqimg -m QMGR -t obj /backup records media images; rcrmqobj restores objects from those images.
The DEADQ queue-manager attribute names the dead letter queue; unset means undeliverable messages are discarded.
DISPLAY QMSTATUS shows queue-manager status including CONNS and the current log file.
Configuration
DEFINE QLOCAL(Q) MAXDEPTH(100000) MAXMSGL(104857600) DEFPSIST(YES) sets depth, message size, and persistence defaults.
NPMCLASS(HIGH) on a local queue lets non-persistent messages survive a queue manager restart.
A sender channel's XMITQ must be a local queue; a remote queue definition's XMITQ must match the sender channel's XMITQ.
TRIGTYPE(FIRST) fires one trigger message when the queue transitions from empty to non-empty; EVERY fires on each message.
CLUSRCVR channels carry the CLUSTER attribute that makes a queue manager a cluster member.
A listener is started with START LISTENER(name) after DEFINE LISTENER(name) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR).
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG in the queue manager errors directory is the first place to look for channel and startup failures.
DISPLAY CHSTATUS shows STATUS(RUNNING, RETRYING, STOPPED, BINDING) and SUBSTATE such as MQGET or SENDING.
CURSEQNO mismatch between channel ends indicates lost or duplicated messages; compare with DISPLAY CHSTATUS on both sides.
SHORTRTY/SHORTTMR and LONGRTY/LONGTMR govern channel retry intervals and counts.
2035 MQRC_NOT_AUTHORIZED points to OAM or CHLAUTH rules; 2053 MQRC_Q_FULL points to MAXDEPTH or a stalled consumer.
A stopped sender channel leaves messages on the transmission queue; DISPLAY QLOCAL(XMITQ) CURDEPTH confirms.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
Security
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('user') AUTHADD(CONNECT,INQ) controls queue-manager-level access.
SET CHLAUTH('CHL') TYPE(BLOCKUSER) USERLIST('nobody') blocks specific user IDs from connecting.
CHLAUTH rules are evaluated in order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match applies.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
dspmq shows queue manager status; dspmq -m QMGR -o all adds installation and directory details.
endmqm -w waits for connected applications; -i is immediate and -p permits shutdown after current work.
DISPLAY QSTATUS TYPE(QUEUE) reports CURDEPTH, IPPROCS, and OPPROCS for a queue.
DISPLAY QSTATUS TYPE(HANDLE) lists processes holding a queue open, which identifies blocking consumers.
runmqsc QMGR < file.txt runs commands from a file; check the AMQ return codes in the output.
rcdmqimg records media images into the log; rcrmqobj restores objects from those images.
The DEADQ attribute names the dead letter queue; undeliverable messages go there instead of being discarded.
Configuration
DEFINE QLOCAL sets MAXDEPTH, MAXMSGL, DEFPSIST, and trigger attributes at creation; ALTER changes them later.
A remote queue definition needs RNAME, RQMNAME, and XMITQ; the sender channel must use the same XMITQ.
Sender and receiver channel ends must agree on channel name and transport type.
CONNAME on the sender points at the partner host and listener port, default 1414.
ALTER QMGR REPOS(YES) makes a full repository; partial repositories join via CLUSRCVR channels.
DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) followed by START LISTENER starts the listener.
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG is the current error log; older entries rotate to AMQERR02.LOG and AMQERR03.LOG.
DISPLAY CHSTATUS(CHL) ALL shows STATUS, SUBSTATE, CURSEQNO, and the last message date for diagnosis.
Reason code 2035 is an authorization failure; check SET AUTHREC and CHLAUTH rules for the user ID.
Reason code 2059 means the queue manager is not available: check dspmq status and the listener.
STOP CHANNEL(CHL) MODE(FORCE) terminates a channel that will not stop normally, but can leave in-doubt messages.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
A message on SYSTEM.DEAD.LETTER.QUEUE with an MQDLH header records the original destination queue and the failure reason code.
Security
SET AUTHREC OBJTYPE(QUEUE) PROFILE(APP.Q) PRINCIPAL('user') AUTHADD(PUT,GET) grants queue authorities to a principal.
SET CHLAUTH('CHL') TYPE(ADDRESSMAP) ADDRESS('10.0.0.*') MCAUSER('appuser') maps incoming addresses to a user ID.
CHLAUTH evaluation order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match wins.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both channel ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
crtmqm -q QMGR creates a queue manager without starting it; -lp sets the log primary count and -ls the log secondary count.
strmqm -x QMGR starts in the background and returns immediately; without -x the command waits for startup to finish.
dltmqm QMGR deletes a queue manager and its data; it fails if the queue manager is running.
DISPLAY QLOCAL(*) CURDEPTH lists current depths for all local queues; CURDEPTH is the number of messages on the queue.
rcdmqimg -m QMGR -t obj /backup records media images; rcrmqobj restores objects from those images.
The DEADQ queue-manager attribute names the dead letter queue; unset means undeliverable messages are discarded.
DISPLAY QMSTATUS shows queue-manager status including CONNS and the current log file.
Configuration
DEFINE QLOCAL(Q) MAXDEPTH(100000) MAXMSGL(104857600) DEFPSIST(YES) sets depth, message size, and persistence defaults.
NPMCLASS(HIGH) on a local queue lets non-persistent messages survive a queue manager restart.
A sender channel's XMITQ must be a local queue; a remote queue definition's XMITQ must match the sender channel's XMITQ.
TRIGTYPE(FIRST) fires one trigger message when the queue transitions from empty to non-empty; EVERY fires on each message.
CLUSRCVR channels carry the CLUSTER attribute that makes a queue manager a cluster member.
A listener is started with START LISTENER(name) after DEFINE LISTENER(name) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR).
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG in the queue manager errors directory is the first place to look for channel and startup failures.
DISPLAY CHSTATUS shows STATUS(RUNNING, RETRYING, STOPPED, BINDING) and SUBSTATE such as MQGET or SENDING.
CURSEQNO mismatch between channel ends indicates lost or duplicated messages; compare with DISPLAY CHSTATUS on both sides.
SHORTRTY/SHORTTMR and LONGRTY/LONGTMR govern channel retry intervals and counts.
2035 MQRC_NOT_AUTHORIZED points to OAM or CHLAUTH rules; 2053 MQRC_Q_FULL points to MAXDEPTH or a stalled consumer.
A stopped sender channel leaves messages on the transmission queue; DISPLAY QLOCAL(XMITQ) CURDEPTH confirms.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
Security
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('user') AUTHADD(CONNECT,INQ) controls queue-manager-level access.
SET CHLAUTH('CHL') TYPE(BLOCKUSER) USERLIST('nobody') blocks specific user IDs from connecting.
CHLAUTH rules are evaluated in order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match applies.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
dspmq shows queue manager status; dspmq -m QMGR -o all adds installation and directory details.
endmqm -w waits for connected applications; -i is immediate and -p permits shutdown after current work.
DISPLAY QSTATUS TYPE(QUEUE) reports CURDEPTH, IPPROCS, and OPPROCS for a queue.
DISPLAY QSTATUS TYPE(HANDLE) lists processes holding a queue open, which identifies blocking consumers.
runmqsc QMGR < file.txt runs commands from a file; check the AMQ return codes in the output.
rcdmqimg records media images into the log; rcrmqobj restores objects from those images.
The DEADQ attribute names the dead letter queue; undeliverable messages go there instead of being discarded.
Configuration
DEFINE QLOCAL sets MAXDEPTH, MAXMSGL, DEFPSIST, and trigger attributes at creation; ALTER changes them later.
A remote queue definition needs RNAME, RQMNAME, and XMITQ; the sender channel must use the same XMITQ.
Sender and receiver channel ends must agree on channel name and transport type.
CONNAME on the sender points at the partner host and listener port, default 1414.
ALTER QMGR REPOS(YES) makes a full repository; partial repositories join via CLUSRCVR channels.
DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) followed by START LISTENER starts the listener.
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG is the current error log; older entries rotate to AMQERR02.LOG and AMQERR03.LOG.
DISPLAY CHSTATUS(CHL) ALL shows STATUS, SUBSTATE, CURSEQNO, and the last message date for diagnosis.
Reason code 2035 is an authorization failure; check SET AUTHREC and CHLAUTH rules for the user ID.
Reason code 2059 means the queue manager is not available: check dspmq status and the listener.
STOP CHANNEL(CHL) MODE(FORCE) terminates a channel that will not stop normally, but can leave in-doubt messages.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
A message on SYSTEM.DEAD.LETTER.QUEUE with an MQDLH header records the original destination queue and the failure reason code.
Security
SET AUTHREC OBJTYPE(QUEUE) PROFILE(APP.Q) PRINCIPAL('user') AUTHADD(PUT,GET) grants queue authorities to a principal.
SET CHLAUTH('CHL') TYPE(ADDRESSMAP) ADDRESS('10.0.0.*') MCAUSER('appuser') maps incoming addresses to a user ID.
CHLAUTH evaluation order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match wins.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both channel ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
crtmqm -q QMGR creates a queue manager without starting it; -lp sets the log primary count and -ls the log secondary count.
strmqm -x QMGR starts in the background and returns immediately; without -x the command waits for startup to finish.
dltmqm QMGR deletes a queue manager and its data; it fails if the queue manager is running.
DISPLAY QLOCAL(*) CURDEPTH lists current depths for all local queues; CURDEPTH is the number of messages on the queue.
rcdmqimg -m QMGR -t obj /backup records media images; rcrmqobj restores objects from those images.
The DEADQ queue-manager attribute names the dead letter queue; unset means undeliverable messages are discarded.
DISPLAY QMSTATUS shows queue-manager status including CONNS and the current log file.
Configuration
DEFINE QLOCAL(Q) MAXDEPTH(100000) MAXMSGL(104857600) DEFPSIST(YES) sets depth, message size, and persistence defaults.
NPMCLASS(HIGH) on a local queue lets non-persistent messages survive a queue manager restart.
A sender channel's XMITQ must be a local queue; a remote queue definition's XMITQ must match the sender channel's XMITQ.
TRIGTYPE(FIRST) fires one trigger message when the queue transitions from empty to non-empty; EVERY fires on each message.
CLUSRCVR channels carry the CLUSTER attribute that makes a queue manager a cluster member.
A listener is started with START LISTENER(name) after DEFINE LISTENER(name) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR).
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG in the queue manager errors directory is the first place to look for channel and startup failures.
DISPLAY CHSTATUS shows STATUS(RUNNING, RETRYING, STOPPED, BINDING) and SUBSTATE such as MQGET or SENDING.
CURSEQNO mismatch between channel ends indicates lost or duplicated messages; compare with DISPLAY CHSTATUS on both sides.
SHORTRTY/SHORTTMR and LONGRTY/LONGTMR govern channel retry intervals and counts.
2035 MQRC_NOT_AUTHORIZED points to OAM or CHLAUTH rules; 2053 MQRC_Q_FULL points to MAXDEPTH or a stalled consumer.
A stopped sender channel leaves messages on the transmission queue; DISPLAY QLOCAL(XMITQ) CURDEPTH confirms.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
Security
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('user') AUTHADD(CONNECT,INQ) controls queue-manager-level access.
SET CHLAUTH('CHL') TYPE(BLOCKUSER) USERLIST('nobody') blocks specific user IDs from connecting.
CHLAUTH rules are evaluated in order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match applies.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
dspmq shows queue manager status; dspmq -m QMGR -o all adds installation and directory details.
endmqm -w waits for connected applications; -i is immediate and -p permits shutdown after current work.
DISPLAY QSTATUS TYPE(QUEUE) reports CURDEPTH, IPPROCS, and OPPROCS for a queue.
DISPLAY QSTATUS TYPE(HANDLE) lists processes holding a queue open, which identifies blocking consumers.
runmqsc QMGR < file.txt runs commands from a file; check the AMQ return codes in the output.
rcdmqimg records media images into the log; rcrmqobj restores objects from those images.
The DEADQ attribute names the dead letter queue; undeliverable messages go there instead of being discarded.
Configuration
DEFINE QLOCAL sets MAXDEPTH, MAXMSGL, DEFPSIST, and trigger attributes at creation; ALTER changes them later.
A remote queue definition needs RNAME, RQMNAME, and XMITQ; the sender channel must use the same XMITQ.
Sender and receiver channel ends must agree on channel name and transport type.
CONNAME on the sender points at the partner host and listener port, default 1414.
ALTER QMGR REPOS(YES) makes a full repository; partial repositories join via CLUSRCVR channels.
DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) followed by START LISTENER starts the listener.
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG is the current error log; older entries rotate to AMQERR02.LOG and AMQERR03.LOG.
DISPLAY CHSTATUS(CHL) ALL shows STATUS, SUBSTATE, CURSEQNO, and the last message date for diagnosis.
Reason code 2035 is an authorization failure; check SET AUTHREC and CHLAUTH rules for the user ID.
Reason code 2059 means the queue manager is not available: check dspmq status and the listener.
STOP CHANNEL(CHL) MODE(FORCE) terminates a channel that will not stop normally, but can leave in-doubt messages.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
A message on SYSTEM.DEAD.LETTER.QUEUE with an MQDLH header records the original destination queue and the failure reason code.
Security
SET AUTHREC OBJTYPE(QUEUE) PROFILE(APP.Q) PRINCIPAL('user') AUTHADD(PUT,GET) grants queue authorities to a principal.
SET CHLAUTH('CHL') TYPE(ADDRESSMAP) ADDRESS('10.0.0.*') MCAUSER('appuser') maps incoming addresses to a user ID.
CHLAUTH evaluation order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match wins.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both channel ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.
Administration
crtmqm -q QMGR creates a queue manager without starting it; -lp sets the log primary count and -ls the log secondary count.
strmqm -x QMGR starts in the background and returns immediately; without -x the command waits for startup to finish.
dltmqm QMGR deletes a queue manager and its data; it fails if the queue manager is running.
DISPLAY QLOCAL(*) CURDEPTH lists current depths for all local queues; CURDEPTH is the number of messages on the queue.
rcdmqimg -m QMGR -t obj /backup records media images; rcrmqobj restores objects from those images.
The DEADQ queue-manager attribute names the dead letter queue; unset means undeliverable messages are discarded.
DISPLAY QMSTATUS shows queue-manager status including CONNS and the current log file.
Configuration
DEFINE QLOCAL(Q) MAXDEPTH(100000) MAXMSGL(104857600) DEFPSIST(YES) sets depth, message size, and persistence defaults.
NPMCLASS(HIGH) on a local queue lets non-persistent messages survive a queue manager restart.
A sender channel's XMITQ must be a local queue; a remote queue definition's XMITQ must match the sender channel's XMITQ.
TRIGTYPE(FIRST) fires one trigger message when the queue transitions from empty to non-empty; EVERY fires on each message.
CLUSRCVR channels carry the CLUSTER attribute that makes a queue manager a cluster member.
A listener is started with START LISTENER(name) after DEFINE LISTENER(name) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR).
CHAD on the queue manager controls whether unknown inbound channels are auto-defined.
Troubleshooting
AMQERR01.LOG in the queue manager errors directory is the first place to look for channel and startup failures.
DISPLAY CHSTATUS shows STATUS(RUNNING, RETRYING, STOPPED, BINDING) and SUBSTATE such as MQGET or SENDING.
CURSEQNO mismatch between channel ends indicates lost or duplicated messages; compare with DISPLAY CHSTATUS on both sides.
SHORTRTY/SHORTTMR and LONGRTY/LONGTMR govern channel retry intervals and counts.
2035 MQRC_NOT_AUTHORIZED points to OAM or CHLAUTH rules; 2053 MQRC_Q_FULL points to MAXDEPTH or a stalled consumer.
A stopped sender channel leaves messages on the transmission queue; DISPLAY QLOCAL(XMITQ) CURDEPTH confirms.
strmqtrc -t all enables trace; endmqtrc stops it; trace files are written to the trace directory under /var/mqm/trace.
Security
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('user') AUTHADD(CONNECT,INQ) controls queue-manager-level access.
SET CHLAUTH('CHL') TYPE(BLOCKUSER) USERLIST('nobody') blocks specific user IDs from connecting.
CHLAUTH rules are evaluated in order: SSLPEERMAP, USERMAP, ADDRESSMAP, QMGRMAP, BLOCKUSER; the first match applies.
SSLKEYR points to the key repository stem; the queue manager appends .kdb for the CMS format.
SSLCIPH must match on both ends; SSLCIPH(ANY_TLS12) allows any TLS 1.2 cipher.
CONNAUTH(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) enables user ID and password checks; ADOPTCTX(YES) uses the supplied ID for authority checks.
AUTHOREV(ENABLED) writes authorization failure events to SYSTEM.ADMIN.QUEUE for monitoring.