Native Inspect Manual (H06.13+, J06.03+)

When referencing a multilevel table in Native Inspect, you can apply subscripts only to the last
item in the reference. For example, consider the following declaration:
01 VEHICLE.
03 MODEL OCCURS 9 TIMES.
05 STYLE OCCURS 12 TIMES.
07 COLOR OCCURS 15 TIMES PICTURE 9(10).
Examples of valid table references are as follows:
MODEL (3)
STYLE OF MODEL (3,11)
COLOR OF STYLE OF MODEL (3,11,14)
MODEL.STYLE.COLOR (3,11,14)
You reference an entire table by specifying the table name without subscripts. For example, the
following command displays all elements of table TOTAL-A:
(eInspect 3,1012): print TOTAL-A
Subscripts are used to refer to specific instances of scalar variables that are part of a table of
records. For example, consider the following declaration:
01 MASTER.
02 TABLE-1 OCCURS 5 TIMES.
03 TABLE-2 OCCURS 5 TIMES.
04 ELEMENT PIC X.
The following is an example of a reference to an instance of the scalar variable ELEMENT:
ELEMENT (3, 2)
This use of the comma is Native Inspect syntax, not COBOL syntax.
Specifying Tables With Variable Upper Bounds
You can declare COBOL tables with a variable upper bound. For example:
01 MASTER.
03 TABLE OCCURS 5 TO 10 TIMES DEPENDING ON ITEM.
If, in a Native Inspect print command, you specify the table name with no subscripts to print the
entire table, Native Inspect evaluates the variable upper bound specified with the DEPENDING
ON keywords to determine the number of elements to display. However, in rare situations where
Native Inspect is unable to evaluate the variable upper bound, the table is displayed up to the
maximum specified by the OCCURS keyword.
For the preceding declaration, if you specify the following, then Native Inspect attempts to evaluate
the variable ITEM to determine the number of elements to display:
print TABLE
Specifying Level 88 Condition Names
You can attach a condition name to any data item. You specify a condition name the same way
as you would specify a member of a record. For example, consider the declaration:
01 REC.
05 ITEM PIC 99.
88 GOOD-ITEM VALUE 10 THRU 20.
You could specify the following:
GOOD-ITEM OF ITEM OF REC
Alternatively, omit any qualifiers not required for uniqueness, just as you would for any other data
item.
You can also attach a condition name to a table or to a member of a record that is a table. In that
case, you must specify a subscript with the condition name. To evaluate the condition name, specify
the same subscript on the condition name as you would for the condition variable name. For
example, consider the following declaration:
Specifying Variables and Tables 49