Working with Commands in WebSphere MQ series

Ratings:
(4.5)
Views:142
Banner-Img
  • Share this blog:

WebSphere MQ Commands:

1. To list all Queue Managers with their current status, use the command dspmq.

2. To view the MQ Series version, type dspmqver.

3. To create a Queue Manager, use the command crtmqm <QueueManager Name>.

For example, crtmqm Exercise1QM. Note that when using MQ Explorer, a listener will be created automatically, but when using a command, you may need to create a listener explicitly (this is optional).

4. To create a listener, use the command DEF LISTENER <listener name>.

5. To start a Queue Manager, use the command strmqm <QueueManager Name>.

For example, strmqm Exercise1QM.

6. To stop a Queue Manager, use the command endmqm <QueueManager Name>.

For example, endmqm Exercise1QM.

7. To delete a Queue Manager, use the command dltmqm <QueueManager Name>.

For example, dltmqm Exercise1QM.

8. To create MQ objects such as queues, use the command runmqsc <QueueManager Name>.

For example, runmqsc Exercise1QM.

9. To create a local queue, use the command define qlocal <QueueName>.

For example, define qlocal Exercise1QL1.

10. To put test messages onto a queue, use the command amqsput <QueueName> <QueueManager Name>.

For example, amqsput Exercise1QL1 Exercise1QM.

11. To browse messages on a queue, use the command amqsbcg or amqsgbr <QueueName> <QueueManager Name>.

For example, amqsbcg Exercise1QL1 Exercise1QM.

12. To delete or get a message from a queue, use the command amqsget <QueueName> <QueueManager Name>.

For example, amqsget Exercise1QL1 Exercise1QM.

13. To display or alter properties or list queue manager objects, use MQSC commands.

14. To display all queues of the queue manager, use the command dis q(*).

15. To display all local queues of the queue manager, use the command dis ql(*).

16. To create an Alias Queue, use the command def qa <Queue Name> targq(<Target Queue Name>). For example, def qa Exercise1QA1 targq(Exercise1QL1).

17. To display an Alias Queue, use the command dis qa(<Alias Queue Name>). For example, dis qa(Exercise1QA1).

18. To display all Alias queues of the queue manager, use the command dis qa(*).

19. To create a Remote Queue, use the command def qr <Queue Name>.

For example, def qr Exercise1QR1.

19. To display a Remote queue, use the command dis qr(<Remote Queue Name>).

For example, dis qr(Exercise1QR1).

20. To display all Remote queues of the queue manager, use the command dis qr(*).

21. To create a Model Queue, use the command def qm <Queue Name>.

For example, def qm Exercise1QM1.

22. To display a Model Queue, use the command dis qm(<Model Queue Name>).

For example, dis qm(Exercise1QM1).

23. To display properties of all Model queues, use the command dis qm(*).

24. To display properties of the Queue Manager, use the command dis qmgr.

25. To delete a queue, use the command delete ql(<Queue Name>).

Note that this command will throw an error if the queue is not empty, so you need to clear the queue first using the command

You liked the article?

Like : 2

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.