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-45
Field-Characteristic Clauses
•
A screen field described with an OCCURS clause and associated with a data item by
a TO, FROM, or USING clause, must define the same maximum number of
occurrences in the OCCURS clause as is specified in the associated data item
OCCURS clause. The following example is a Working-Storage data item associated
with the screen field.
WORKING-STORAGE SECTION.
01 GAME-SCHE-REC.
:
05 TABLE-A PIC X(8) OCCURS 4 TIMES.
:
SCREEN SECTION.
:
05 FIELD-A AT 6, 10 PIC X(8) USING TABLE-A
OCCURS IN 4 COLUMNS
SKIPPING 1.
•
If the data item named in the TO, FROM, or USING clause has subordinate items
and contains multiple OCCURS clauses, the maximum number of occurrences for
each OCCURS clauses must match the maximum number of occurrences specified
in the corresponding screen field descriptions.
•
A single screen description can have any number of variable length tables. The
restriction of one for each structure that applies to the Working-Storage Section and
Linkage Section does not apply to screens.
•
The OCCURS clause cannot define a screen group; however, the clause can define
screen fields in a screen group. The following example shows how the OCCURS
clause defines each screen field in a screen group:
SCREEN SECTION.
:
03 DATA-OUT.
05 JOB-ENTRY.
07 JOB-NR AT 6,16 PIC Z(4)
FROM JOB-NR OF SCREEN-TEMP
OCCURS ON 10 LINES
SKIPPING 1.
07 JOB-STATE AT 6,22 PIC X(5)
FROM JOB-STATE OF SCREEN-TEMP
OCCURS ON 10 LINES
SKIPPING 1.
•
A reference to a screen field that is described with an OCCURS clause should
appear without a subscript when the field is used as one of the screen identifiers in
an ACCEPT statement. In other statements where screen identifiers can be used, a
reference to a screen field described with an OCCURS clause can appear with or
without a subscript. A reference without a subscript refers to all occurrences of the
table. A reference that includes a subscript refers only to the occurrence selected by
the value of the subscript.
•
When a screen field described with a DEPENDING phrase is referred to in an
ACCEPT statement, part of the ACCEPT statement processing performed by the
TCP is the determination of the size of the table—the value to be stored into data-
name-1. All occurrences of the field are examined and the TCP sets