Format 5

DISPLAY LINE draws a horizontal or vertical line on the screen.

 [ UPON new-window ]

   { SIZE length  }
   { LINES height }

Remaining phrases are optional, can appear in any order.

AT screen-loc


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

{REVERSE      }

WITH {COLOR } color-val

[LEFT    ]
[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-integer values. 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. Exactly one of the SIZE or LINES phrases must be specified. The selected phrase may appear anywhere in the statement.
  10. The LINES phrase can take a numeric expression.
  11. IS and "=" are synonymous.
  12. COLUMN, COL, POSITION, and POS are equivalent.
  13. REVERSE-VIDEO, REVERSE, and REVERSED are equivalent.
  14. COLOR and COLOUR are synonymous.

General Rules

  1. The DISPLAY LINE verb provides the ability to draw horizontal and vertical lines in a machine- and terminal-independent fashion. The lines are drawn using the best mode available on the display device. Used together with the DISPLAY BOX verb, this verb provides the ability to draw forms on the user's screen.

    DISPLAY LINE is an older, character-based technology. If you want fine control over lines displayed on graphical systems, use the BAR control instead. See Control Types Reference in User Interface Programming for more information.

  2. The appropriate intersection character (corner or three-way intersection) is used when drawn lines intersect other lines on the screen.
  3. If the SIZE phrase is specified, the line drawn is horizontal. The value of length gives the size of the line in screen columns. If the LINES phrase is used instead, the line drawn is a vertical line and height describes the number of screen rows to use.
  4. Lines never wrap around or cause scrolling. If the LINES or SIZE phrase would cause the line to leave the current window, the line is truncated at the edge of the window.
AT, LINE, and COLUMN Phrases
  1. The value of line-num gives the starting row of the line. The value of col-num gives the starting column. The value of screen-loc gives the starting row and column. Lines are always drawn to the right or downwards as appropriate. screen-loc, line-num, and col-num must specify a position that is contained in the current window. See Common Screen Options for more information.
  2. If the LINE NUMBER phrase is not specified, line one is used. If the COLUMN NUMBER phrase is missing, column one is used.
TITLE Phrase
  1. The TITLE phrase has effect only when you are drawing horizontal lines. When it is specified, title-string is printed in part of the line.
  2. The title may be printed near the right side, near the left side, or in the center of the line depending whether the RIGHT, LEFT, or CENTERED phrase is specified. If none is specified, CENTERED is used.

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

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