DSPMSG (Display Messages) Command Description

DSPMSG Command syntax diagram

Purpose

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: A description of how to print messages is in the Work with printer output article in the Information Center.

Restrictions:

  1. DSPMSG cannot be specified when another job has already allocated the message queue by specifying the ALCOBJ command operating in the *EXCL lock state.
  2. 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.
  3. 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.
  4. 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.

Optional Parameters

MSGQ
Specifies the qualified name of the message queue from which messages are shown.

Note: The values *WRKUSR, *SYSOPR, and *WRKSTN can be used only when the user is in an interactive job.

*WRKUSR: Messages are shown from the work station's message queue. After exiting this display, the message queue for the job's user profile is shown. If there are no messages on the work station message queue, only the user profile message queue is shown.

*SYSOPR: Messages from the system operator message queue (QSYSOPR) are shown.

*USRPRF: Messages from the current user profile message queue are displayed.

*WRKSTN: Messages are shown from the work station's own message queue.

The name of the message queue can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

message-queue-name: Specify the name of the message queue from which messages are shown. The system operator can specify QSYSOPR to show messages on the system operator message queue.

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

*ALL: All messages that are 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 the inquiry messages that were sent to other message queues and still require replies are shown.

START
Specifies whether the newest messages or the oldest messages in the message queue (of those specified by the MSGTYPE and SEV parameters) are shown first. The display station user can roll the display up or down 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.

*LAST: 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 Roll Down 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 Roll Up key to show older messages.

*FIRST: If the intermediate view (Dispaly Messages) 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 Roll Up key to show newer messages.

If the Basic view (Work with Messages) is displayed, the first (oldest) message on the MSGQ is shown on the bottom of the display. The display station user can press the Roll Down ket to show newer messages.

SEV
Specifies the severity code of the message. The severity code indicates the severity level of the condition that causes the message to be sent.

00: All messages in the specified message queue are shown.

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

severity-code: Specify a value, ranging from 00 through 99, that specifies the minimum severity code that a message must have to still be shown. More information on this parameter is in commonly used parameters.

OUTPUT
Specifies whether the output from the command is shown at the requesting display station or listed with the job's spooled output on a printer. More information on this parameter is in commonly used parameters.

*: Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output. Immediate messages can be 512 bytes long.

*PRINT: The output is printed with the job's spooled output. Impromptu messages and predefined messages are truncated to 105 characters.

PRTWRAP: The output is printed with the job's spooled output without truncation.

ASTLVL
Specifies the user interface to display.

*PRV: The previous user interface used is displayed.

*USRPRF: The user interface specified in the current user profile is used.

*BASIC: The Operational Assistant* user interface is used. 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 message list.

*INTERMED: The system user interface is used.

Note: The DSPMSG command documentation assumes the *INTERMED user interface is shown. If the *BASIC user interface is shown, see the documentation for the Work with Messages (WRKMSG) command.

Examples for DSPMSG

Example 1: Displaying Messages From Work Station Message Queue and User Profile Message Queue

DSPMSG

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.

Error messages for DSPMSG

*ESCAPE Messages

CPF2203
User profile &1 not correct.
CPF2204
User profile &1 not found.
CPF2213
Not able to allocate user profile &1.
CPF2217
Not authorized to user profile &1.
CPF2225
Not able to allocate internal system object.
CPF2401
Not authorized to library &1.
CPF2403
Message queue &1 in &2 not found.
CPF2408
Not authorized to message queue &1.
CPF2433
Function not allowed for system log message queue &1.
CPF2450
Work station message queue &1 not allocated to job.
CPF2451
Message queue &1 is allocated to another job.
CPF2477
Message queue &1 currently in use.
CPF2513
Message queue &1 cannot be displayed.
CPF2537
Too many records written to file &2 in &3.
CPF8127
&8 damage on message queue &4 in &9. VLIC log-&7.
CPF8176
Message queue for device description &4 damaged.
CPF9830
Cannot assign library &1.
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
CPF9847
Error occurred while closing file &1 in library &2.