The Display Messages (DSPMSG) command is 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 in which this command is entered or to any other job, it is implicitly allocated by this command for the duration of the command. When the messages are shown, options are also shown that allow the user to either remove one or more messages from the queue or to enter a reply to each inquiry message.
Note: Refer to the section entitled "Handling Messages" in the Basic system operations topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for a description of how to print a single message description or a group of message descriptions.
DSPMSG cannot be specified when another job has already allocated the message queue by specifying the ALCOBJ command operating in the *EXCL lock state.
The DSPMSG command allows the user to see, but not remove, messages for the job when the message queue is in the *BREAK or *NOTIFY mode for another job.
When the message queue is in the *BREAK mode for another job, the break handling program for the message queue determines whether the user is allowed to respond to inquiry messages. If PGM(*DSPMSG) is specified, the user can reply to inquiry messages, but if PGM(user-program) is specified, no reply to inquiry messages is allowed.
If multiple jobs show the same inquiry message, and all jobs reply to the message, only the first reply to the message is valid. Subsequent replies from other jobs cause error messages to be issued.
Specifies the message queue from which messages are shown.
Note: The special values *WRKSTN, *WRKUSR, *USRPRF, and *SYSOPR should be specified for this parameter only when you are in an interactive job.
Messages are shown from the work station's message queue if there are any messages on it. After the user exits that display, messages are shown from the current user's user profile message queue. If there are no messages on the work station's message queue, only the messages from the user profile message queue are shown.
Messages from the system operator message queue (QSYSOPR) are shown.
Messages are shown from the work station's own message queue.
Messages from the current user profile message queue are shown.
Qualifier 1: Message queue
Specify the name of the message queue from which messages are shown.
Qualifier 2: Library
All libraries in the library list for the current thread are searched until the first match is found.
The current library for the job is used to locate the message queue. If no current library entry exists in the library list, QGPL is used.
Specify the library where the message queue is located.
Specifies, whether the newest messages or the oldest messages in the message queue are shown first. The display station user can use the Page Up or Page Down key to see other messages if the message list occupies more than one display screen. This parameter is ignored if the output is directed to a spooled printer file.
If the intermediate view (Display Message) is displayed, the last (newest) message on the message queue is shown on the bottom line of the display. The display station user can press the Page Up key to show older messages.
If the Basic view (Work with Messages) is displayed, the last (newest) message on the MSGQ is shown on the top line of the display. The display station user can press the Page Down key to show older messages.
If the intermediate view (Display Message) is displayed, the first (oldest) message on the message queue is shown on the top line of the display. The display station user can press the Page Down key to show newer messages.
If the basic view (Work with Messages) is displayed the first (oldest) message on the message queue is shown on the bottom of the display. The display station user can press the Page Up key to show newer messages.
Specifies the lowest severity level that a message can have and still be delivered to a user in break or notify mode. Messages arriving at the message queue whose severities are lower than that specified here do not interrupt the job or turn on the message-waiting light; they are held in the queue until they are displayed by the Display Message (DSPMSG) command.
All messages in the specified message queue are shown.
All messages having a severity code greater than or equal to the severity code specified for the message queue are shown.
Specify a value, 00 through 99, that specifies the lowest severity code that a message can have and still be shown.
The user interface stored in the current user profile is used.
The Operational Assistant user interface is used.
Note: This user interface separates messages into two categories: (1) messages needing a reply and (2) messages not needing a reply. New messages are shown at the top of each list.
The system user interface is used.
Note: The DSPMSG command online help information assumes the *INTERMED user interface is shown. If the *BASIC user interface is shown, see the online help information for the Work with Messages (WRKMSG) command.
Example 1: Displaying Messages From Work Station Message Queue and User Profile Message Queue
This command 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.
Example 2: Displaying Informational Messages
DSPMSG MSGQ(SMITH) MSGTYPE(*INFO)
This command displays, at the requester's work station, any informational messages in the message queue named SMITH.