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

Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
5-47
Field-Characteristic Clauses
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.
°
If the current size exceeds the maximum size and the screen table is
referenced with a subscript, the TCP suspends the terminal and displays an
error message.
°
If the current size exceeds the maximum size and the screen table is
referenced without a subscript, the TCP runs the statement as if the current
size is zero. The TCP does not, however, flag this as an error and the
operation is performed on zero items in the screen table.
The following example illustrates the OCCURS clause:
05 FLD-A AT 6, 10 PIC X(8) FROM TBL-A
OCCURS IN 4 COLUMNS OFFSET 10.
An equivalent OCCURS clause would be:
OCCURS IN 4 COLUMNS SKIPPING 2.
PICTURE Clause
The PICTURE clause defines the format in which the data appears on the terminal
screen.
{ PIC } [ IS ]
character-string
{ PICTURE }