Format 6

DISPLAY BOX draws a box on the screen.

 [ UPON new-window ]

Remaining phrases are optional, can appear in any order.

AT screen-loc


AT {COLUMN  } NUMBER col-num
   {COL     }
   {POS     }

SIZE length

LINES height

{REVERSE      }

WITH {COLOR } color-val

         [RIGHT   ]

Syntax Rules

  1. Different formats of the DISPLAY statement may be mixed together in one DISPLAY statement, as long as no ambiguity results. The effect is the same as specifying each DISPLAY statement separately.
  2. new-window is a USAGE HANDLE or PIC X(10) data item. If used, the UPON phrase must be the first optional phrase specified.
  3. screen-loc is an integer data item or literal containing exactly 4 or 6 digits. It may also be a group item of 4 or 6 characters. If a numeric item is used, it must be a non-negative integer.
  4. line-num, col-num, length, and height are numeric data items or literals. They may be non-integers, but only the integer value will be applied. You can also specify the value of any of these items with an arithmetic expression.
  5. color-val is a numeric data item, literal, or arithmetic expression.
  6. Title is an alphanumeric literal or data item.
  7. If the UPON phrase is specified, it must be the first optional phrase.
  8. If the AT phrase is specified, neither the LINE nor the COLUMN phrase may be specified.
  9. The LINES phrase can take a numeric expression.
  10. IS and "=" are synonymous.
  11. COLUMN, COL, POSITION, and POS are equivalent.
  12. REVERSE-VIDEO, REVERSE, and REVERSED are equivalent.
  13. COLOR and COLOUR are synonymous.

General Rules

  1. The DISPLAY BOX verb provides the ability to draw a box in a machine- and terminal-independent manner. The best drawing mode of the display device is used. If the lines used in drawing a box intersect other lines already present on the screen, the appropriate intersection characters are used.
  2. DISPLAY BOX is an older, character-based technology. For fine control of boxes on graphical systems, use the FRAME control. See Control Types Reference in User Interface Programming for more information.
  3. You specify the location of the box by providing the location of the upper-left corner. You specify the size of the box by providing a height and a width.
AT, LINE, and COLUMN Phrases

The AT, LINE NUMBER, and COLUMN NUMBER phrases operate in the same manner as they do when they are used in a DISPLAY LINE statement (Format 5).

SIZE and LINES Phrases

The SIZE phrase specifies the width of the box. The LINES phrase specifies its height. Length and height must specify values greater than one. If the SIZE phrase is absent, the box will extend to the right edge of the current window. If the LINES phrase is missing, the box will extend to the bottom of the current window.


The COLOR and REVERSE phrases operate in the same manner as described in Common Screen Options. Note that the COLOR value may not specify blinking, underlining, or an intensity (boxes are always drawn in a terminal-dependent intensity).

TITLE Phrase

The TITLE phrase operates in the same manner as it does for a DISPLAY WINDOW verb (Format 3).

Note: Phrases not described above are described in Common Screen Options.