[IBM i]

WRKMQMMSG (Work with MQ Messages)

Where allowed to run
All environments (*ALL)
Threadsafe
Yes

The Work with MQ Messages (WRKMQMMSG) command lists the messages on a specified local queue and allows you to work with those messages. From the list of messages, you can display the contents of a message and its associated message descriptor (MQMD).

Parameters

Table 1. Command parameters
Keyword Description Choices Notes
QNAME Queue name Character value Required, Positional 1
MQMNAME Message Queue Manager name Character value, *DFT Optional, Positional 2
FIRST First Message 1-30000, 1 Optional, Positional 3
MAXMSG Maximum number of messages 1-30000, 48 Optional, Positional 4
MAXMSGLEN Maximum message size 128-999999, 1024 Optional, Positional 5

Queue name (QNAME)

Specifies the name of the local queue.

The possible values are:

queue-name
Specify the name of the local queue.

Message Queue Manager name (MQMNAME)

Specifies the name of the message queue manager.

The possible values are:

*DFT
Use the default queue manager.
queue-manager-name
Specify the name of the queue manager.

First Message (FIRST)

Specifies the number of the first message to display.

The possible values are:

1
The number of the first message to display is 1.
message-number
Specify the number of the first message to display ranging from 1 through 30 000.

Maximum number of messages (MAXMSG)

Specifies the maximum number of messages to display.

The possible values are:

48
Display a maximum of 48 messages.
count-value
Specify a value for the maximum number of messages to display ranging from 1 through 30 000.

Maximum message size (MAXMSGLEN)

Specifies the maximum size of message data to display.

The size of a message, greater than the value specified, is suffixed by a plus (+) character to indicate that the message data is truncated.

The possible values are:

1024
The size of the message data is 1024 bytes.
length-value
Specify a value ranging from 128 through 999999.