Command reference / msg

DSPMSG

Display Messages

Used by the display station user to show the messages received at the specified message queue. If the message queue is not allocated to the job running the command or to any other job, the command allocates it implicitly for its duration. When messages are shown, options also let the user remove one or more messages from the queue or reply to each inquiry message. The QSYS2.MESSAGE_QUEUE_INFO view returns similar information.

Allowed environments: *ALL. Positional parameters: 1.

Restrictions

Parameters

MSGQ Message queue

Specifies the message queue from which messages are shown. The special values *WRKSTN and *WRKUSR should be specified only in an interactive job.

Type
*QUAL
Required
No
Default
*WRKUSR
Case
Uppercase

Suggested / special values: *WRKUSR, *SYSOPR, *USRPRF, *WRKSTN

*WRKUSR
Messages are shown from the work station's message queue if it has any, then from the current user profile message queue.
*SYSOPR
Messages from the system operator message queue (QSYSOPR) are shown.
*WRKSTN
Messages are shown from the work station's own message queue.
*USRPRF
Messages from the current user profile message queue are shown.
*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the message queue; if none, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Message queue Message queue

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OUTPUT Output

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

Type
*CHAR
Required
No
Default
*
Length
8
Case
Uppercase

Allowed values: *, *PRINT, *PRTWRAP

*
The output is shown (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job). Immediate messages can be 512 bytes long.
*PRINT
The output is printed with the job's spooled output, one line per message containing the first 105 bytes of the first level message text.
*PRTWRAP
The output is printed with the job's spooled output; messages that do not fit on one line wrap onto additional lines, up to 512 bytes of first level message text.

MSGTYPE Message type

Specifies the type of messages in the message queue that are shown.

Type
*CHAR
Required
No
Default
*ALL
Length
5
Case
Uppercase

Allowed values: *ALL, *INFO, *INQ, *COPY

*ALL
All messages in the message queue are shown.
*INFO
Only informational messages (those not requiring a reply) are shown.
*INQ
Only inquiry messages (those requiring a reply) are shown.
*COPY
Copies of inquiry messages sent to other message queues that still require replies are shown.

START Messages to display first

Specifies whether the newest or the oldest messages in the message queue are shown first. This parameter is ignored if the output is directed to a spooled printer file.

Type
*CHAR
Required
No
Default
*LAST
Length
6
Case
Uppercase

Allowed values: *LAST, *FIRST

*LAST
The newest message is shown first.
*FIRST
The oldest message is shown first.

SEV Severity code filter

Specifies the lowest severity level that a message can have and still be delivered to a user in break or notify mode. Messages below that severity are held in the queue until shown by DSPMSG.

Type
*UINT2
Required
No
Default
0
Range
0 to 99
Case
Uppercase

Suggested / special values: *MSGQ

*MSGQ
All messages with a severity code greater than or equal to the severity code specified for the message queue are shown.

ASTLVL Assistance level

Specifies which user interface to display.

Type
*CHAR
Required
No
Default
*PRV
Length
9
Case
Uppercase

Allowed values: *PRV, *USRPRF, *BASIC, *INTERMED

*PRV
The previous user interface used is displayed.
*USRPRF
The user interface stored in the current user profile is used.
*BASIC
The Operational Assistant user interface is used.
*INTERMED
The system user interface is used.

Examples

DSPMSG

Displays messages in the requester's work station message queue, followed by the user profile message queue. If there are no messages in the work station queue, the user profile message queue is shown immediately.

DSPMSG MSGQ(SMITH) MSGTYPE(*INFO)

Displays, at the requester's work station, any informational messages in the message queue named SMITH.

IBM command documentation

Generated from os/cl/catalog/DSPMSG.json and os/cl/help/DSPMSG.json.