First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Administration
An administrator needs to create a queue manager named QM1 with its data under /var/mqm/QM1 on a Linux system. Which command creates it with the default object definitions and logging settings intact?
- crtmqm QM1 Correct answer.
- crtmqm -q QM1
- crtmqm -md /var/mqm/QM1 QM1
- strmqm -c QM1
Explanation
crtmqm with only the queue manager name creates the queue manager using default paths derived from the prefix and default linear logging settings, and it also creates the default system objects. Additional flags such as -md override the directory, while -q suppresses default object creation.
Question 2Administration
Which command starts a queue manager named QM1 and leaves it ready to accept connections from client applications?
- endmqm QM1
- runmqsc QM1
- strmqm QM1 Correct answer.
- dspmq -m QM1
Explanation
strmqm starts the queue manager and its associated processes, including the listeners configured to start automatically, so it becomes available to connecting applications. runmqsc is an administration shell, endmqm stops the queue manager, and dspmq only displays status.
Question 3Administration
A queue manager must be stopped so that no new MQGET calls succeed but in-flight transactions are allowed to complete and persistent messages are not lost. Which command accomplishes this?
- endmqm -i QM1 Correct answer.
- endmqm -w QM1
- endmqm -p QM1
- endmqm -c QM1
Explanation
The -i (immediate) option stops the queue manager without waiting for applications to disconnect, but it still permits in-progress units of work to complete so persistent data is preserved. A quiesce (-q) waits for applications to disconnect, and -p terminates processes abruptly.
Question 4Administration
An administrator wants a queue manager to shut down gracefully after waiting for connected applications to disconnect, with no forced termination. Which command provides this behavior?
- endmqm -i QM1
- endmqm QM1
- endmqm -p QM1
- endmqm -q QM1 Correct answer.
Explanation
The quiesce option (-q) prevents new connections and waits for existing applications to disconnect before stopping the queue manager. This is the most graceful shutdown mode and avoids terminating active applications.
Question 5Administration
Which file contains the queue manager configuration stanza that sets attributes such as the listener port and log type for QM1?
- /var/mqm/errors/AMQERR01.LOG
- /var/mqm/qmgrs/QM1/queues/QM1.queue
- /var/mqm/qmgrs/QM1/qm.ini Correct answer.
- /var/mqm/mqs.ini
Explanation
Each queue manager stores its own configuration attributes in qm.ini under its data directory, including stanzas for logging, channels, and TCP listeners. The mqs.ini file holds machine-wide information such as the list of queue managers.
Question 6Administration
A listener must be configured so that channel connections are accepted on TCP port 1415 for queue manager QM1. Which MQSC command achieves this?
- DEFINE LISTENER(QM1.LSTR) TRPTYPE(TCP) PORT(1415) CONTROL(QMGR) Correct answer.
- ALTER QMGR PORT(1415)
- DEFINE CHANNEL(QM1.LSTR) CHLTYPE(TCP) PORT(1415)
- DEFINE CHANNEL(QM1.LISTENER) CHLTYPE(SVRCONN) PORT(1415)
Explanation
Listeners are defined with the DEFINE LISTENER command specifying transport type and port, and CONTROL(QMGR) makes the listener start and stop with the queue manager. The channel type SVRCONN defines a server-connection channel, not a listener.
Question 7Administration
An administrator defines a local queue with DEFINE QLOCAL(APP.REQ). Which attribute determines whether messages are written to disk to survive a queue manager restart?
- SHARE on the queue
- DEFPSIST on the queue Correct answer.
- PUT on the queue
- MAXDEPTH on the queue
Explanation
DEFPSIST sets the default persistence for messages put to the queue when the application does not specify persistence explicitly. Persistent messages are logged and recoverable across restart, while non-persistent messages can be lost.
Question 8Administration
Applications must put messages to a queue but must not be able to read from it. Which queue attribute setting enforces this?
- DEFINE QLOCAL(APP.REQ) PUT(DISABLED)
- DEFINE QLOCAL(APP.REQ) USAGE(XMITQ)
- DEFINE QLOCAL(APP.REQ) SHARE
- DEFINE QLOCAL(APP.REQ) GET(DISABLED) Correct answer.
Explanation
Setting GET(DISABLED) prevents applications from retrieving messages while leaving PUT enabled so producers can still add messages. This is commonly used for queues that feed a channel or another consumer exclusively.
Question 9Administration
A queue must retain messages for a remote system that is temporarily unavailable, and messages should not be discarded when the queue is full. Which attribute combination is relevant to controlling maximum depth behavior?
- MAXDEPTH and MAXMSGL
- MAXDEPTH and the queue full event settings Correct answer.
- DEFPSIST and DEFPRTY
- TRIGGER and TRIGTYPE
Explanation
MAXDEPTH sets the queue's maximum message count, and the queue-full event settings (such as PERFMEV and the queue depth high event thresholds) determine whether an event is generated when the limit is reached. Together they govern behavior when the queue fills.
Question 10Administration
Which queue type holds messages destined for a remote queue manager until a message channel is available to transmit them?
- Dead-letter queue
- Transmission queue Correct answer.
- Alias queue
- Model queue
Explanation
A transmission queue stores messages bound for a remote queue manager; the sending message channel reads from it and forwards the messages over the network. It is associated with the remote queue manager through the XMITQ attribute on the channel.
Question 11Administration
Messages that cannot be routed to their destination must be stored in a queue for later inspection. Which queue is designated for this purpose?
- SYSTEM.CHANNEL.SYNCQ
- SYSTEM.DEFAULT.LOCAL.QUEUE
- SYSTEM.ADMIN.COMMAND.QUEUE
- SYSTEM.DEAD.LETTER.QUEUE Correct answer.
Explanation
The dead-letter queue, conventionally SYSTEM.DEAD.LETTER.QUEUE, holds messages that a queue manager cannot deliver, for example because the target queue does not exist or the message is too large. Administrators should define it and set it as the queue manager's dead-letter queue.
Question 12Administration
An administrator must point the queue manager to a specific dead-letter queue. Which MQSC command sets this?
- DEFINE QALIAS(SYSTEM.DEAD.LETTER.QUEUE) TARGQ(DLQ)
- ALTER QMGR DEADQ(SYSTEM.DEAD.LETTER.QUEUE) Correct answer.
- ALTER QMGR MAXMSGL(4194304)
- ALTER QLOCAL(SYSTEM.DEAD.LETTER.QUEUE) USAGE(DLQ)
Explanation
The queue manager's DEADQ attribute names the local queue used as the dead-letter queue, so ALTER QMGR DEADQ(...) is the correct command. Once set, the queue manager routes undeliverable messages to that queue.
Question 13Administration
A sender channel to a remote queue manager must use a specific local transmission queue rather than the default derived name. Which channel attribute specifies this?
- XMITQ Correct answer.
- TRPTYPE
- SEQWRAP
- CONNAME
Explanation
The XMITQ attribute on a sender or server channel names the local transmission queue the channel reads from. Without it, the channel uses a transmission queue named after the remote queue manager.
Question 14Administration
Which attribute on a sender channel defines the remote host name and port that the channel connects to?
- LOCLADDR
- MCAUSER
- XMITQ
- CONNAME Correct answer.
Explanation
CONNAME holds the connection name, typically a host name or IP address followed by the port, used by the sending end of a channel to reach the remote listener. LOCLADDR, by contrast, constrains the local address used for the connection.
Question 15Administration
A server-connection channel must restrict which client user IDs are permitted to connect. Which attribute on the SVRCONN channel enforces this?
- SSLPEER Correct answer.
- CHLTYPE
- MCAUSER
- MAXMSGL
Explanation
SSLPEER on a server-connection channel restricts access to clients whose distinguished name in the presented certificate matches the specified pattern. This ties the connection to an identity verified through TLS.
Question 16Administration
An administrator wants a server-connection channel to require a TLS handshake before any client data flows. Which attribute must be set on the channel?
- TRPTYPE(UDP)
- HBINT(0)
- SSLCIPH Correct answer.
- BATCHSZ(1)
Explanation
SSLCIPH specifies the CipherSpec used for TLS on the channel; setting it enables the TLS handshake. Without a CipherSpec, the channel runs without encryption and does not perform the handshake.
Question 17Administration
Which object is used to grant a group of users authorization to put messages to a specific queue?
- A namelist
- A queue manager alias
- An authority record defined with SET AUTHREC Correct answer.
- A channel authentication record
Explanation
SET AUTHREC creates authority records that grant or revoke specific authorizations, such as put or get, for principals or groups on named objects like queues. Channel authentication records control connection-level access rather than object authorizations.
Question 18Administration
An administrator needs to see the current depth of a local queue without stopping the queue manager. Which MQSC command displays it?
- DISPLAY QSTATUS(APP.REQ)
- DISPLAY QMGR CURDEPTH
- DISPLAY QUEUE(APP.REQ) CURDEPTH Correct answer.
- DISPLAY CHANNEL(APP.REQ)
Explanation
DISPLAY QUEUE with the CURDEPTH attribute reports the current number of messages on the queue. This is a read-only query that does not affect queue manager operation.
Question 19Administration
Which command displays the status of a queue, including whether it is currently open and by how many handles?
- DISPLAY QMSTATUS
- DISPLAY QSTATUS(APP.REQ) Correct answer.
- DISPLAY CHSTATUS(APP.REQ)
- DISPLAY QUEUE(APP.REQ) MAXDEPTH
Explanation
DISPLAY QSTATUS returns status attributes for a queue, such as IPPROCS and OPPROCS, which show how many handles are open for input and output. These values help determine whether consumers are actively reading from the queue.
Question 20Administration
An administrator wants to confirm whether a message channel is currently running and see its last sequence number. Which command provides this?
- DISPLAY QSTATUS(TO.REMOTE)
- DISPLAY CHSTATUS(TO.REMOTE) Correct answer.
- DISPLAY CHINIT
- DISPLAY CHANNEL(TO.REMOTE)
Explanation
DISPLAY CHSTATUS reports runtime status for a channel, including whether it is running, its current state, and sequence number information. DISPLAY CHANNEL shows the definition rather than the live status.
Question 21Administration
A queue manager's log files are filling the filesystem, and the administrator needs to understand which logging configuration is in use. Which log type allows the queue manager to reuse log extents after they are no longer needed?
- Circular logging Correct answer.
- Linear logging
- Both use fixed non-reusable extents
- Neither uses extents
Explanation
Circular logging reuses log extents once the data they contain is no longer required for restart recovery, keeping log space bounded. Linear logging keeps extents and requires manual management or media image processing to reclaim space.
Question 22Administration
An administrator must take a consistent backup of a queue manager that uses linear logging while it remains available. Which approach supports this?
- Delete the log extents and restart
- Recreate the queue manager with crtmqm
- Use the media image and log records to recover the object definitions Correct answer.
- Stop the queue manager and copy the data directory
Explanation
With linear logging, media images record object definitions and changes, and the log extents allow recovery to a consistent point. Taking a media image while the queue manager runs supports an online backup without stopping it.
Question 23Administration
A message channel repeatedly fails with a security exit error on the receiving side. Which action best isolates whether the problem is certificate-related?
- Check the channel status and error logs for TLS handshake messages Correct answer.
- Increase BATCHSZ on the channel
- Reduce MAXMSGL on the channel
- Change the transmission queue name
Explanation
TLS handshake failures are recorded in channel status and error logs, often with messages about certificate validation or CipherSpec mismatch. Reviewing these logs pinpoints whether the certificate chain, peer name, or CipherSpec is the cause.
Question 24Administration
Which command displays the attributes of a queue manager, such as its dead-letter queue and maximum message length?
- DISPLAY QLOCAL
- DISPLAY QMSTATUS
- DISPLAY QMGR Correct answer.
- DISPLAY SYSTEM
Explanation
DISPLAY QMGR returns the queue manager's attributes, including DEADQ and MAXMSGL. It is the standard way to verify queue manager-level settings without inspecting configuration files directly.
Question 25Administration
An administrator wants to route messages to a remote queue manager without an explicit transmission queue name by relying on the remote queue manager name. Which object should be defined on the local queue manager?
- A remote queue definition naming the remote queue manager Correct answer.
- A model queue
- A local queue with USAGE(XMITQ)
- A namelist
Explanation
A remote queue definition specifies the remote queue manager name and remote queue name, allowing the local queue manager to resolve the destination and select the matching transmission queue. This lets applications put to a local-looking queue that forwards messages remotely.
Question 26Administration
An administrator wants a queue manager to start automatically when the host operating system boots on a Linux system using systemd. Which approach is the supported way to achieve this?
- Configure the queue manager's STARTUP attribute to AUTOMATIC in qm.ini
- Enable the IBM MQ systemd service unit provided with the product so the queue manager starts with the system Correct answer.
- Add the strmqm command to the root user's .bashrc so it runs at login
- Create a cron entry that runs strmqm every minute to confirm it is running
Explanation
IBM MQ ships systemd unit files (such as the service that runs the queue manager set configured at install time), and enabling that unit makes the queue manager start at boot in a supported manner. Startup is controlled by the service manager rather than by shell profiles or polling cron jobs. There is no queue manager STARTUP attribute in qm.ini that triggers automatic start.
Question 27Administration
An administrator needs to create a queue manager named QM2 that uses a non-default directory for its data files. Which command accomplishes this?
- crtmqm -md /data/mq QM2 Correct answer.
- crtmqm -d /data/mq QM2
- crtmqm -p /data/mq QM2
- crtmqm -ld /data/mq QM2
Explanation
The -md parameter of crtmqm specifies the directory in which the queue manager's data is created, allowing it to be placed outside the default prefix. Other single-letter parameters control different aspects, such as logging or prefix, and do not set the data directory. Getting this right at creation time avoids relocating data later.
Question 28Administration
A queue manager must be stopped so that applications connected to it are disconnected and in-flight transactions are rolled back cleanly. Which command performs a quiesce-and-stop of queue manager QM1?
- endmqm -w QM1
- endmqm -p QM1
- endmqm -c QM1
- endmqm -i QM1 Correct answer.
Explanation
The -i (immediate) option of endmqm stops the queue manager without waiting for applications to disconnect, ending their connections and backing out uncommitted work. The -w option instead waits for applications to end normally, which would block indefinitely if they do not disconnect. Choosing -i is appropriate when a prompt, clean shutdown is required.
Question 29Administration
An administrator wants to prevent a queue manager from accepting new channel connections while existing work drains, without fully stopping it. Which command achieves this?
- endmqm -p QM1
- alter qmgr INHIBTEV(ENABLED)
- suspend qmgr QM1 Correct answer.
- stop chinit QM1
Explanation
The suspend qmgr command places the queue manager in a suspended state so that it stops accepting new connections while existing connections and work continue. This is useful for draining activity before maintenance. It is distinct from ending the queue manager entirely.
Question 30Administration
An administrator wants to define a local queue that allows applications to put messages but prevents them from being read by ordinary applications. Which single attribute setting achieves this restriction?
- Set PUT(DISABLED) on the local queue
- Set DEFTYPE(TEMPDYN) on the local queue
- Set GET(DISABLED) on the local queue Correct answer.
- Set USAGE(XMITQ) on the local queue
Explanation
Setting GET(DISABLED) on a local queue prevents applications from retrieving messages while still allowing puts, which is useful for queues that feed a channel or a protected process. PUT(DISABLED) would block the puts instead. The other attributes change the queue's role rather than its get permission.
Question 31Administration
An administrator needs to grant a group the authority to put messages onto queue APP.INQ. Which MQSC command is appropriate?
- setmqaut -m QM1 -t queue -n APP.INQ -g appgrp +put Correct answer.
- setmqaut -m QM1 -t channel -n APP.INQ -g appgrp +put
- setmqaut -m QM1 -t queue -n APP.INQ -p appgrp +get
- setmqaut -m QM1 -t qmgr -n APP.INQ -g appgrp +put
Explanation
The setmqaut command grants authority to a principal or group; the -t queue type with -n naming the queue and -g naming the group, followed by +put, grants put authority on that queue. The queue manager must match the one hosting the queue. Specifying the wrong object type or authority does not produce the intended grant.
Question 32Administration
An administrator wants to review which authorities a group currently holds on a specific queue. Which command displays the authorization records?
- dspmqaut -m QM1 -t queue -n APP.INQ -g appgrp Correct answer.
- dspmqfls -m QM1 -t queue -n APP.INQ
- display qmgr AUTHORITY
- dspmq -m QM1 -o auth
Explanation
The dspmqaut command reports the authorities that a principal or group has on a named object of a given type, such as a queue. It is the counterpart to setmqaut for verification. The other commands display queue manager status, queue manager attributes, or file information rather than authorization records.
Question 33Administration
An administrator wants to see which channels are currently running and their status on queue manager QM1. Which command is appropriate?
- display chinit(*)
- display channel(*)
- display chstatus(QM1.*) Correct answer.
- display chs(*)
Explanation
The display chstatus command shows the current status of channels, including whether they are running, and supports a generic name pattern to select the channels of interest. The channel initiator and channel definitions are separate objects with their own display commands. Reviewing status is the correct way to confirm running channels.
Question 34Administration
A sender channel keeps failing and the administrator wants to see the reason code recorded for the most recent failure. Which command provides channel status including the last error?
- display chstatus(TO.QM2) Correct answer.
- display chs(TO.QM2)
- display qstatus(TO.QM2)
- display chl(TO.QM2)
Explanation
The chstatus display reports the channel's current state along with information such as the last sequence number and the last error, which helps diagnose why a channel stopped. Channel definitions alone do not show the runtime error. Using the status verb is the correct way to inspect a channel's recent failure.
Question 35Administration
An administrator needs to reset the message sequence number on a sender channel after resolving a mismatch with the partner. Which command performs this?
- reset chstatus(TO.QM2)
- reset channel(TO.QM2) seqnum(1) Correct answer.
- start channel(TO.QM2) seqnum(1)
- alter channel(TO.QM2) seqnum(1)
Explanation
The reset channel command repositions the sequence number of a channel, which is required when the two ends disagree about the expected message number. Altering the channel definition or starting it does not change the stored sequence number. Coordinating the reset with the partner is essential to restore synchronization.
Question 36Administration
A queue manager uses linear logging and the administrator wants to create an image of the queue manager's objects for recovery purposes while it runs. Which command is used?
- rcdmqimg -m QM1 -t all * Correct answer.
- strmqm -c QM1
- dmpmqcfg -m QM1 -a
- saveqmgr -m QM1 -f backup
Explanation
The rcdmqimg command records media images of objects, including queues and other object types, into the log for linear-logging recovery. It can be run while the queue manager is active. This complements log archiving so that recovery can replay changes after the image.
Question 37Administration
An administrator wants to determine how much log space a queue manager is currently using and which log files are active. Which command provides log information?
- display qmgr LOGTYPE
- dspmqlin -m QM1
- dspmq -m QM1 -o log Correct answer.
- dmpmqlog -m QM1
Explanation
The dspmq command with the -o log option reports log configuration and usage details for a queue manager, including active log extents. This helps an administrator assess filesystem consumption. It is distinct from dumping log contents or checking a single attribute.
Question 38Administration
A channel fails with a security exit error on the receiving end. Which action best isolates whether the local security exit is the cause?
- Temporarily remove the security exit from the channel definition and retest the connection Correct answer.
- Disable the dead-letter queue on the queue manager
- Change the channel's transport type to client connection
- Increase the channel's maximum message length
Explanation
If the security exit is suspected, removing it from the channel definition and retesting shows whether the failure persists without it. If the channel then works, the exit is implicated and its logs and configuration can be examined. Changing unrelated attributes does not isolate the exit.
Question 39Administration
An administrator wants to review the queue manager's attributes, including its dead-letter queue name and maximum message length, in one output. Which command is used?
- display qmstatus
- display qmgr DEFAULT
- display qlocal(*)
- display qmgr Correct answer.
Explanation
The display qmgr command returns the queue manager's attributes, including settings such as the dead-letter queue name and maximum message length. It is the standard way to review queue manager configuration. Display commands for queues or status do not show these queue manager attributes.
Question 40Administration
An administrator defines a remote queue definition that names a target queue and queue manager but omits the transmission queue name. How does the queue manager determine which transmission queue to use?
- It rejects the definition until an explicit transmission queue is provided
- It uses the transmission queue whose name matches the remote queue manager name Correct answer.
- It always uses SYSTEM.DEFAULT.XMIT.QUEUE
- It creates a new transmission queue automatically
Explanation
When the transmission queue name is left blank on a remote queue definition, the queue manager derives it from the remote queue manager name, using a transmission queue with that same name. This is why administrators commonly define a transmission queue named after the destination queue manager. The behavior is deterministic rather than automatic creation.
Question 41Administration
An administrator wants to define a transmission queue and ensure it is recognized as such by the queue manager. Which attribute setting is required?
- MSGDLVSQ(PRIORITY)
- USAGE(XMITQ) Correct answer.
- SHARE
- DEFTYPE(PREDEFINED)
Explanation
A transmission queue is a local queue defined with USAGE(XMITQ) so that the queue manager treats it as a staging queue for channels. Without this usage setting, the queue behaves as an ordinary local queue and channels will not use it as intended. The other attributes affect sharing, delivery sequence, or definition type but not transmission usage.
Question 42Administration
An administrator wants a trigger monitor to start an application when a message arrives on a queue. Which attribute must be set on the application queue to enable triggering?
- TRIGGER Correct answer.
- MAXDEPTH
- INITQ
- GET
Explanation
Setting TRIGGER on the local queue enables trigger events for that queue, which the trigger monitor uses to start the configured process. The INITQ attribute names the initiation queue, but the trigger must be enabled for events to be generated. Without TRIGGER enabled, arrival of messages does not produce trigger messages.
Question 43Administration
An administrator must define an initiation queue that a trigger monitor reads to start applications. Which queue type is appropriate?
- A model queue
- A remote queue definition
- An alias queue
- A local queue Correct answer.
Explanation
An initiation queue is an ordinary local queue on the queue manager where the trigger monitor runs; the monitor reads trigger messages from it. Alias, remote, and model queues do not serve as the physical queue from which the monitor retrieves messages. The initiation queue is then named in the INITQ attribute of application queues.
Question 44Administration
An administrator wants to move messages from a queue to a file for later analysis without an application. Which command can be used?
- dmpmqcfg -m QM1 -o all > messages.txt
- dmpmqmsg -m QM1 -I APP.INQ -f messages.txt
- amqsget APP.INQ > messages.txt Correct answer.
- amqsput APP.INQ < messages.txt
Explanation
The sample program amqsget retrieves messages from a queue and writes them to standard output, which can be redirected to a file for inspection. It is a simple way to drain and capture message content. The other commands either put messages, dump object definitions, or export configuration rather than message bodies.
Question 45Administration
An administrator wants to check the current depth and maximum depth of a local queue. Which command provides these values?
- display queue(APP.INQ) DEPTH
- display qmgr CURDEPTH
- display qstatus(APP.INQ)
- display qlocal(APP.INQ) CURDEPTH MAXDEPTH Correct answer.
Explanation
The display qlocal command shows the queue's attributes, including CURDEPTH and MAXDEPTH, when those attributes are requested. Queue status displays report runtime information such as open handles rather than these attributes. Requesting specific attributes keeps the output focused.
Question 46Administration
An administrator needs to prevent a queue from growing without bound and causing the queue manager to fill the filesystem. Which attribute setting limits the number of messages on a local queue?
- MAXHANDS
- MAXDEPTH Correct answer.
- MAXUMSGS
- MAXMSGL
Explanation
MAXDEPTH defines the maximum number of messages that may be held on a local queue; once reached, further puts fail rather than allowing unbounded growth. MAXMSGL limits individual message size, and MAXHANDS limits open handles. Setting MAXDEPTH appropriately protects storage.
Question 47Administration
An administrator wants to change the maximum message length allowed by the queue manager. Which command does this?
- setmqaut -m QM1 -t qmgr +maxmsgl
- alter qmgr MAXMSGL(4194304) Correct answer.
- alter qlocal(*) MAXMSGL(4194304)
- alter qmgr MAXDEPTH(4194304)
Explanation
MAXMSGL is a queue manager attribute that sets the maximum message length the queue manager accepts, and it is changed with alter qmgr. Individual queues also have MAXMSGL and may impose a lower limit, but the queue manager ceiling is set at queue manager level. The other commands target different attributes or authorities.
Question 48Administration
An administrator wants to confirm whether a queue is currently open and by how many handles. Which command shows this information?
- display qstatus(APP.INQ) Correct answer.
- display qlocal(APP.INQ)
- display chstatus(APP.INQ)
- display qmgr IPPROCS
Explanation
The qstatus display reports runtime information about a queue, including the number of input and output handles currently open against it. Queue definition displays show configured attributes rather than live open counts. This is useful for diagnosing why a queue cannot be cleared or deleted.
Question 49Administration
An administrator wants to clear all messages from a local queue while the queue manager remains running. Which command does this?
- reset qlocal(APP.INQ)
- clear qlocal(APP.INQ) Correct answer.
- delete qlocal(APP.INQ)
- purge queue(APP.INQ)
Explanation
The clear qlocal command removes all messages from a local queue without deleting the queue definition. Deleting the queue would destroy the object itself, and there is no purge verb for this purpose. The queue must not be open for input by an application when clearing.
Question 50Administration
An administrator must delete a local queue that is currently open by an application. Which action is required first?
- Disable the queue manager's logging
- Stop the application or otherwise close the queue so it is no longer open Correct answer.
- Convert the queue to a transmission queue
- Remove the queue's authorization records
Explanation
A queue cannot be deleted while it has open handles, so the application holding it open must disconnect or close the queue first. Once no handles remain, the delete succeeds. Changing logging, authorities, or the queue's usage does not release the open handles.