COBOL Manual for TNS/E Programs (H06.03+)
Data Fundamentals
HP COBOL Manual for TNS/E Programs—520347-003
4-20
Subscripts
condition-name
is a level-88 item associated with either a data item described with an OCCURS
clause or a data item subordinate to a data item described with an OCCURS
clause. If condition-name is qualified, the subscripts follow the qualifiers.
subscript
integer
is a nonzero numeric literal. If it is signed, the sign must be positive.
qualified-name
is the identifier of an integer numeric data item. It can be qualified, but cannot
have subscripts or reference modifiers.
index-name
is the index in the INDEXED phrase of the OCCURS clause that describes
data-name. Its value is the occurrence number of an element in the
associated table. The program must initialize the value of an index-name
before using it in a subscript.
offset
is an unsigned integer numeric literal. Its value is added to (+) or subtracted
from (-) the value of qualified-name or index-name.
Example 4-7 shows subscripting for two 1-dimensional tables and a 2-dimensional
table.
Example 4-7. Subscripting for Tables
MOVE TOTAL OF REPORT-MARK (8) TO REPORT-TOTAL-8.
MOVE MONTH-NAME (MONTH-NUMBER + 2) TO REPORT-MONTH.
MOVE MATRIX (ROW COLUMN) TO OUTPUT-DISPLAY-LINE.
integer
qualified-name
index-name
+
offset
-
VST007.vsd










