Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-64
DISPLAY Statement
the current value of the associated Working-Storage item must be saved, the value
changed, the new value displayed, and the previous current value restored.
nonnumeric-literal
is a value that is sent to the terminal for each selected field. The value is not
converted; it is truncated or extended with the fill character if necessary. The value
must be in quotation marks.
If this clause is omitted, the data for a selected screen field is obtained from the
Working-Storage data item specified in the FROM or USING clause of the screen
field description. The data is converted and edited according to the screen field
declaration, and those characters are placed in the field on the terminal display.
screen-identifier
is a screen, screen group, or elementary output item of any active screen; the
maximum is 127 items per DISPLAY statement. When
screen-identifier
is
not an elementary item, it refers to all subordinate elementary items that have a
VALUE, FROM, or USING clause in their definitions.
DEPENDING ON
identifier
selects either zero or one
screen-identifier
from the list of screen fields. The
statement whose position in the
screen-identifier
list is the same as the
value in
identifier
is selected. If the value in
identifier
is less than 1 or
greater than the number of screen identifiers, no
screen-identifier
is
selected.
SHADOWED
selects from the
screen-identifier
list only those fields that have
SHADOWED items in which the SELECT bit is set. Fields in the
screen-identifier
list that do not have SHADOWED items are not selected.
The DEPENDING ON clause for the DISPLAY statement is analogous to the
DEPENDING ON clause for the PERFORM ONE statement. The following example
illustrates this.
WORKING-STORAGE SECTION.
:
77 ws-screen-status PIC 9(4) COMP VALUE 1.
01 ws-fld1 PIC x(10).
01 ws-fld2 PIC x(10).
01 ws-fld3 PIC x(10).
SCREEN SECTION.
:
01 MENU1 SIZE 24, 80.
Note. If neither the DEPENDING ON modifier nor the SHADOWED modifier is specified, all
fields in the list are selected.