Message

Syntax

MESSAGE { expression | ERROR | ATTENTION } [ expression ]

Parameters

Message can be abbreviated as ME.

Note: On MCP-based systems, no expression can include wide characters.

Description

The Message logic command sends a message to the user interface.

If only one message is displayed, it appears on the status line at the bottom of Page 1. If two or more messages are invoked, they appear on Page 2 of the terminal.

Multiple messages are displayed on MCP-based systems in reverse order to which they are coded.

Messages sent from an unattached report are not returned to the user interface.

When processing an OLTP transaction, the Message command is ignored. The built-in segment attribute Glb.Error is set to five asterisks (*****). No other user indication is given.

Note: Messages queued from the Message logic command take priority over any teach screen currently displayed.

Failure behavior

The Message logic command sets the Glb.Error built-in segment attribute to "*****" in ispec methods, but not in report methods.

Restrictions

The following restrictions apply to use of the Message logic command:

Examples

Example 1

In this example, three message lines are displayed if the tested condition is true.

If Total > Debt.CredLimit
     Message Error "Customer has exceeded credit limit"
     Message Amount " is the amount outstanding"
     Message Debt.CredLimit " is the credit limit"
EndExit

Example 2

This example shows that a literal message does not have to be supplied with the Message logic command.

AmtChk := " is the current value in Amount"
Message Amount AmtChk         : Display Amount value and the text in AmtChk.