Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
5-45
Field-Characteristic Clauses
are both used with a field, on output the FILL clause applies to all occurrences of
the field, regardless of the setting of
data-name-1
in a DEPENDING ON clause.
The following conventions apply to the OCCURS clause:
•
When the IN...COLUMNS phrase is omitted, a single occurrence on each line is
indicated.
•
The order of the phrases determines the order in which the occurrence numbers
are assigned to the occurrences.
°
If the ON...LINES phrase is specified first, the occurrences are numbered
sequentially from line to line down a column.
°
If the IN...COLUMNS phrase is specified first, the occurrences across a line
are numbered sequentially.
•
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










