MESSAGE

The MESSAGE instruction displays a message to the user.

Syntax

MESSAGE expression [,...]
  [ {ATTRIBUTE|ATTRIBUTES} ( display-attribute [,...] ) ]
where display-attribute is:
{ BLACK | BLUE | CYAN | GREEN
| MAGENTA | RED | WHITE | YELLOW
| BOLD | DIM | INVISIBLE | NORMAL
| REVERSE | BLINK | UNDERLINE
| STYLE = "style-name"
}
  1. expression is any expression supported by the language.
  2. style-name is a presentation style name.

Usage

The MESSAGE instruction displays a message to the user in an interactive program.

The message will remain visible to the end user until the next MESSAGE instruction.

To cleanup the message text, use MESSAGE "" .

In TUI mode, the text is displayed in the message line of the current window. The message line can be defined by the OPTIONS MESSAGE LINE instruction. Note that the default message line position is the same as the MENU option comment line.

In GUI mode, you can use the STYLE attribute to reference a style definition. This allows you to display errors or messages in GUI mode with more sophisticated visual effects as the regular TTY attributes. If you want to apply a style automatically to all program messages displayed with the MESSAGE instruction, you can use the :message pseudo selector in the style definition.

Example

INPUT BY NAME custrec.* ...
  BEFORE INPUT
    MESSAGE "Enter customer data."
  ...