IBM MQ Commands
Commands are case sensitive and lower case.
Some of the most popular sample programs are:
amqsput PUT
amqsbcg BROWSE
amqsget GET
These are some of the most common:
These are some of the most common:
crtmqm – creates QMGR
strmqm – starts QMGR
endmqm – ends QMGR
dltmqm – deletes QMGR
runmqsc – starts MQ script
Create a queue manager
command:
crtmqm QM1
Start the queue manager
strmqm QM1
Starting MQSC for queue manager QM1.
runmqsc QM1
Create a local queue called LQ1
define qlocal(LQ1)
Stop the scripting tool (command line )
end
Display Queue Manager details
DIS QMGR CONNAUTH
Displaying Queue Manager Status
dspmq
Putting a message to the Queue LQ1
amqsput LQ1 QM1
To end amqsput, press Enter.
Getting messages from the Queue LQ1
amqsget LQ1 QM1
Create a MQ Listener
Add Listener definition using the following commands
./runmqsc QM1
DEFINE LISTENER(QM1.listener) TRPTYPE (TCP) PORT(1414)
START LISTENER(QM1.listener)
end
Create a MQ channel
runmqsc QM1
DEFINE CHANNEL(channel_test) +
CHLTYPE(SVRCONN) +
TRPTYPE(TCP) +
DESCR(‘WebSphere MQ Default Channel’) +
REPLACE
End
****************************************
* Command: "C:\Program Files\IBM\MQ\bin\crtmqm" -sa QM1
****************************************
IBM MQ queue manager created.
Directory 'C:\ProgramData\IBM\MQ\qmgrs\QM1' created.
The queue manager is associated with installation 'Installation1'.
Creating or replacing default objects for queue manager 'QM1'.
Default objects statistics : 86 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.
exitvalue = 0
****************************************
* Command: "C:\Program Files\IBM\MQ\bin\strmqm" QM1
****************************************
IBM MQ queue manager 'QM1' starting.
The queue manager is associated with installation 'Installation1'.
5 log records accessed on queue manager 'QM1' during the log replay phase.
Log replay for queue manager 'QM1' complete.
Transaction manager state recovered for queue manager 'QM1'.
IBM MQ queue manager 'QM1' started using V9.0.0.2.
exitvalue = 0
****************************************
* Command: "C:\Program Files\IBM\MQ\bin\runmqsc" QM1
* Input: DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
****************************************
5724-H72 (C) Copyright IBM Corp. 1994, 2016.
Starting MQSC for queue manager QM1.
1 : DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
AMQ8626: IBM MQ listener created.
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
exitvalue = 0
****************************************
* Command: "C:\Program Files\IBM\MQ\bin\runmqsc" QM1
* Input: START LISTENER('LISTENER.TCP')
****************************************
5724-H72 (C) Copyright IBM Corp. 1994, 2016.
Starting MQSC for queue manager QM1.
1 : START LISTENER('LISTENER.TCP')
AMQ8021: Request to start IBM MQ listener accepted.
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
exitvalue = 0
Queue types –
local queues (normal and xmitq)
alias queue (points to targq)
remote queue (points to queue on remote qmgr
– actual put is to local xmitq)
cluster queue (many different types of queues
which are broadcast as part of a cluster)
model queue (template for dynamic queues)
Dead Letter Queue (DLQ)
- When messages can not be delivered to their intended
destination they may be sent to a Dead Letter Queue
- MQ provides an automated way of handling these Dead
Letter messages – the Dead Letter Queue handler,
invoked by runmqdlq command, is the default routine
supplied by MQ
- We recommend all QMGRs have a DLQ configured. Can
be added via runmqsc alter qmgr command or can be
done during crtmqm with –u option
(i.e. crtmqm -u SYSTEM.DEAD.LETTER.QUEUE TESTQMGR)
MQ commands
| Command name | Purpose |
|---|---|
| amqccert | Check certificate chains |
| amqoamd | Output setmqaut commands |
| amqmdain | Configure or control WebSphere MQ services (Windows® systems only) |
| amqtcert | Transfer certificates |
| crtmqcvx | Convert data |
| crtmqm | Create a local queue manager |
| dltmqm | Delete a queue manager |
| dmpmqaut | Dump authorizations to an object |
| dmpmqlog | Dump a log [url] |
| dspmq | Display queue managers |
| dspmqaut | Display authorizations to an object |
| dspmqcsv | Display the status of a command server |
| dspmqfls | Display file names |
| dspmqrte | Display route application |
| dspmqtrc | Display formatted trace output (UNIX® systems only) |
| dspmqtrn | Display details of transactions [pareja de rsvmqtrn] |
| dspmqver | Display version number |
| endmqcsv | Stop the command server on a queue manager |
| endmqdnm | Stop .NET monitor |
| endmqlsr | Stop the listener process on a queue manager |
| endmqm | Stop a local queue manager |
| endmqtrc | Stop tracing for an entity |
| mqftapp | Run the File Transfer Application |
| mqftrcv | Receive file using the File Transfer Application (server) |
| mqftrcvc | Receive file using the File Transfer Application (client) |
| mqftsnd | Send file using the File Transfer Application (server) |
| mqftsndc | Send file using the File Transfer Application (client) |
| rcdmqimg | Write an image of an object to the log |
| rcrmqobj | Recreate an object from their image in the log |
| rsvmqtrn | Commit or back out a transaction |
| runmqchi | Start a channel initiator process |
| runmqchl | Start a sender or requester channel |
| runmqdlq | Start the dead-letter queue handler |
| runmqdnm | Run .NET monitor |
| runmqlsr | Start a listener process |
| runmqsc | Issue MQSC commands to a queue manager |
| runmqtmc | Invoke a trigger monitor for a client (AIX® clients only) |
| runmqtrm | Invoke a trigger monitor for a server |
| setmqaut | Change authorizations to an object |
| setmqcrl | Set certificate revocation list (CRL) LDAP server definitions (Windows® systems only) |
| setmqprd | Enroll production license |
| setmqscp | Set service connection points (Windows® systems only) |
| strmqcsv | Start the command server for a queue manager |
| strmqm | Start a local queue manager |
| strmqtrc | Enable tracing |



0 comments:
Post a Comment