8. Working with Messages

JMQBrowser offers the following functionalities when working with messages:

  1. Viewing message meta-data
  2. Viewing the message contents
  3. cut/copy/paste/delete messages
  4. import/export messages
  5. Edit messages

All these actions may be invoked by using the "Messages" menu from the menu bar or using the pop-up menu inside the tree view. The actions affect only those messages which are selected in the tree view.

Viewing message meta-data

In the right pane of the window (Detail View) the "MessageHeader" tab shows information about the message by reading the message internal attributes.

For a description about the attributes please check the MQ Series manual.

Viewing the message contents

In the right pane of the window (Detail View) the "MessageContents" tab displays the contents the message.

You can choose between ASCII for text messages, Hex for binary messages and EBCDIC for text messages format.

Cut/Copy/Paste/Delete messages

To do this you first have to select the messages in the tree view. You can select multiple messages from different queues or even from different queue managers.

After choosing "Delete" from the menu bar or the pop-up menu, the messages are removed from the queue.

After "cutting" the messages, they are removed from the queue but are held in the JMQBrowser message buffer so that they can be "pasted" again. A crash of JMQBrowser would lead to a loss of the messages !

"Copy" allows you to copy messages to the JMQBrowser message buffer.

"Paste" will paste messages in the buffer to a queue that you must select in advance in the tree view.

Import/Export messages

JMQBrowser has an import/export facility which allows you to store message contents on a disk and load files from disk which are then stored as message contents in a queue.

To import messages you must first select a queue. After choosing "Import" in the message menu, a directory chooser appears. You must choose a directory (not a file) before clicking on the "open" button. For each file in the choosen directory (not recursive !) a message is created in the selected queue and the file contents is written to the message contents. All other attribute values of the newly created messages are left to default.

Export works the other way around: You must select all the messages in the tree which have to be exported. After choosing "Export" in the message menu, a directory chooser appears. You must choose a directory (not a file) before clicking on the "save" button. For each message a file is created in the directory and the message contents is stored to the file contents. All other attributes of the messages are lost.

Editing messages

JMQBrowser is more than a just a browsing tool - it has the ability to edit existing messages by the help of an included Message Editor.

To activate the Message Editor, first select a message in the tree and choose "Edit" in the "Messages" menu.

The following dialog appears:

You can change the attributes of the messages by double-clicking the corresponding attribute value cell. Please note that attributes are of different types and not all values are allowed.

To edit the message contents, use the text are below the attributes table. The message editor allows you to change the message as a text. Binary messages and binary attributes are shown in their ASCII format.

If you want to put the message back in the queue click the "Save" button, otherwise choose "Cancel". Note that the tree displays the changed values of the message even if you cancel the editing. You must reload the messages by double-clicking the queue in the tree node if you want to have a refreshed view.