CONTROL Phrase

CONTROL cntrl-string
  1. The CONTROL phrase provides the ability to modify the static attributes of the ACCEPT or DISPLAY statement at runtime. The CONTROL data item is treated as a series of comma-separated keywords that control the action of the statement. Within the CONTROL data item, spaces are ignored and lower-case letters are treated as if they were upper-case. When a CONTROL item conflicts with the statically declared attributes of the ACCEPT or DISPLAY statement, the actions specified in the CONTROL item take precedence.

    The keywords allowed in cntrl-string are listed in the following groups. If more than one keyword from within a group appears in cntrl-string, only the rightmost one in the data item is used:

    • ERASE, ERASE EOL, ERASE EOS, NO ERASE.
    • BEEP, NO BEEP
    • HIGH, LOW, STANDARD, OFF
    • BLINK, NO BLINK
    • REVERSE, NO REVERSE
    • TAB, NO TAB
    • PROMPT, NO PROMPT
    • CONVERT, NO CONVERT
    • UPDATE, NO UPDATE
    • ECHO, NO ECHO
    • UPPER, NO UPPER, LOWER, NO LOWER
    • UNDERLINED, NO UNDERLINE
    • LEFT, RIGHT, CENTERED, NO JUST
    • SAME
    • FCOLOR
    • BCOLOR
  2. Each of the keywords performs the same action as the statically declared attribute of the same name. The NO forms (NO ERASE, NO BLINK, etc.) cancel the effects of the named attribute.

    The FCOLOR and BCOLOR keywords are used to set foreground and background colors respectively. These keywords must be followed by an equals sign and the name of a color taken from the following list: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, and WHITE. The named color becomes the default foreground or background color for the window. Note that this is different from the COLOR phrase, which sets the color only for the current ACCEPT or DISPLAY statement. The FCOLOR and BCOLOR keywords set the default colors for every subsequent ACCEPT and DISPLAY until explicitly changed.