Defining Fixed-Length, Multidimensional Tables; Organization Of A Table With An Index And An Ascending Search Key; Defining A Two-Dimensional Table - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

Handling Tables
4.1 Defining Tables
The organization of this table is shown in Figure 4–3.
Figure 4–3 Organization of a Table with an Index and an Ascending Search
Longword number
Byte number
Level 01
Level 05
Level 10
Legend: B = ELEMENTB
4.1.2 Defining Fixed-Length, Multidimensional Tables
Compaq COBOL allows 48 levels of OCCURS nesting. If you want to define a
two-dimensional table, you define another one-dimensional table within each
element of the one-dimensional table. To define a three-dimensional table, you
define another one-dimensional table within each element of the two-dimensional
table, and so on.
A two-dimensional table is shown in Example 4–4.
Example 4–4 Defining a Two-Dimensional Table
01 2D-TABLE-X.
05 LAYER-Y OCCURS 2 TIMES.
The organization of this two-dimensional table is shown in Figure 4–4.
Example 4–5 shows a three-dimensional table.
The organization of this three-dimensional table is shown in Figure 4–5.
4–4 Handling Tables
Key
1
0 0 0 0 0 0 0 0 0 1
1 2 3 4 5 6 7 8 9 0
TABLE−A
B
B
C D C D C D C D C D
C = ITEMC
D = ITEMD
10 LAYER-Z OCCURS 2 TIMES.
15 CELLA PIC X.
15 CELLB PIC X.
2
3
B
B
B
ZK−6041−GE

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?

Table of Contents