Format 2
DISPLAY screen-name displays a Screen Section item defining one or more fields to the screen.
DISPLAY screen-name
[ UPON new-window ]
Remaining phrases are optional, can appear in any order.
AT screen-loc
AT LINE NUMBER line-num
AT {COLUMN } NUMBER col-num
{COL }
{POSITION}
{POS }
Syntax Rules
- 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.
- screen-name is the name of a screen entry declared in the program's Screen Section.
- new-window is a USAGE HANDLE or PIC X(10) data item.
- 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.
- line-num and
col-num are numeric data items or literals. They may be non-integer values. You can also specify the value with an arithmetic expression.
- If the UPON phrase is used, it must be the first optional phrase specified.
- If the AT phrase is specified, neither the LINE nor the COLUMN phrase may be specified.
- COLUMN, COL, POSITION, and POS are equivalent.
General Rules
- A Format 2 DISPLAY statement causes all of the output and update fields in
screen-name to be displayed on the user's screen. Screen-name must be a screen item declared in the program's Screen Section. Before
the fields are displayed, each field has its corresponding data item moved to it. Any controls described in screen-name are
either created or updated as appropriate.
- When a Format 2 DISPLAY statement executes, spaces are moved to each alphabetic, alphanumeric, and alphanumeric edited input
field. Zeros are moved to each numeric and numeric edited input field. Input fields are identified by the word
TO in their Screen Section entry.
- The AT, LINE, and COLUMN phrases describe the starting location of the screen item. These phrases are described in detail
in Common Screen Options. If either the line or column number is missing or zero, line or column number
1 (one) is used.