COBOL Manual for TNS and TNS/R Programs

Data Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
7-79
OCCURS Clause for Fixed-Size Tables
Use of SIGN With Elementary or Data Structures
The SIGN clause can appear in the description of an elementary item or a data
structure. When it appears in the description of an elementary item, it specifies the
sign attributes for that item. The SIGN clause never applies to a data structure,
whose category is always alphanumeric. When it appears in the description of a
data structure, it specifies the sign attributes of every signed numeric item
belonging to that group, except as noted.
A Lower-Level SIGN Clause Overrides an Upper-Level One
A SIGN clause appearing in the data description entry of a data structure or a
numeric data item overrides the SIGN clause of any data structure to which that
item is subordinate; therefore, when more than one SIGN clause apparently
applies to a data item, the one specified at the lowest level in the hierarchy takes
precedence over the ones specified at a higher level.
Data Structure With SIGN Clause Must Include DISPLAY Numeric
When the data description entry of a data structure includes the SIGN clause, at
least one subordinate elementary item must be numeric and be described with a
PICTURE character-string containing S. All such items must be USAGE DISPLAY.
Elementary Item With SIGN Clause Must Be DISPLAY Numeric
When the data description entry of an elementary item includes the SIGN clause,
its category must be numeric, it must be described with a PICTURE character-
string containing S, and it must be USAGE DISPLAY.
The SIGN clause cannot be used for national data items.
OCCURS Clause for Fixed-Size Tables
The OCCURS clause defines tables (sets of repeated items), eliminating the need for
separate item entries. These tables can contain a fixed number of elements or can vary
within given limits. The OCCURS clause without a DEPENDING phrase defines a
fixed-size table.
OCCURS
INDEXED
BY
index
key-order
max
TIMES
VST104.vsd