Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
5-46
Field-Characteristic Clauses
data-name-1 to the occurrence number of the last occurrence that was entered.
If the field is also a required field, all preceding occurrences of the field must also
be entered. Failure to do this causes a PREVIOUS FIELD MISSING error message
to be displayed for the terminal operator.
•
Several tables on the same screen might have the same data-name-1 in their
DEPENDING phrase. If the tables are referred to in the same ACCEPT statement,
the value of data-name-1 is set to the maximum of the values that would be
computed when considering each table separately. If this causes the value of
data-name-1 to be set greater than the highest supplied occurrence of a table
whose fields are required, the input is in error and a REQUIRED FIELD MISSING
or EARLIER FIELD MISSING (depending on the order of the fields) message is
displayed for the terminal operator.
•
When a reference to a screen field described with a DEPENDING phrase appears
without a subscript in any statement other than an ACCEPT statement, the reference
is to all occurrences within the current size of the table, as specified by the value in
data-name-1.
•
When the value of data-name-1 of the DEPENDING phrase decreases and a
DISPLAY statement displays the table of screen field values, the fields previously
displayed beyond the current limit remain on the screen. To avoid having old screen
field values remain on the screen, you can handle the display in one of the following
ways:
°
Specify a DISPLAY BASE or DISPLAY RECOVERY statement before the
DISPLAY statement for the current table of values.
°
Do not use the DEPENDING phrase; define the table for the maximum length
and always display the full table with field values set appropriately.
•
The DEPENDING phrase specifies the maximum size of a screen table that your
program can refer to during execution. The maximum size of a screen table is the
lower of the following values:
°
The literal specified in the OCCURS clause of the associated Working-Storage
table
°
The literal specified in the IN ... COLUMNS or ON ... LINES phrase in the
OCCURS clause of the screen table definition
Generally, you should make certain that these values are the same. If the TCP
references a screen table item with a subscript value that exceeds the maximum size
allowed for the screen table, the TCP suspends the terminal and displays an error
message.
•
By including the DEPENDING clause in the screen table definition you can allow
the screen table to have a varying size based on the value in data-name-1.
The current size of the screen table specified in data-name-1 determines the
maximum subscript value allowed for that screen table and the maximum number of
screen table items that are operated on when no subscript value is specified.
°
If the TCP references a screen table item with a subscript value that exceeds the
current size, the TCP suspends the terminal and displays an error message.