MESSAGE

The MESSAGE instruction displays a message to the user.

Syntax

MESSAGE expression [,...]
  [ 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.

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, the text is displayed in a specific area, depending on the STYLE attribute. When you specify the STYLE attribute, you can reference a style defined in the presentation styles file. This allows you to display errors or messages in GUI mode with more sophisticated visual effects than the regular TTY attributes. Advanced automatic rendering can be obtained with message specific style 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."
  ...