Native Inspect Manual (H06.07+)

Using Native Inspect With COBOL Programs
Native Inspect Manual528122-006
3-8
Assigning Values to Level 88 Condition Names
Assigning Values to Level 88 Condition Names
You cannot modify a level 88 condition name. For example, consider the following
declaration:
01 REC.
02 TABLE OCCURS 4 TIMES.
03 ITEM PIC 99.
88 ITEM-OK VALUE 12.
You cannot assign a new value to ITEM-OK. You can change only the value of the
underlying data item, in this case, the level 03 item ITEM.
Assigning Values to Tables and Records
You can assign multiple values to items that compose a table or record by specifying a
list of values separated by commas and enclosed in braces ({}). For example, consider
the following declaration:
01 MASTER.
02 TABLE-1 OCCURS 2 TIMES.
03 TABLE-2 OCCURS 3 TIMES.
04 ELEMENT PIC X.
The following command assigns values to all six occurrences of ELEMENT:
SET ELEMENT={2, 5, 1, 8, 0, 4}
The values of the elements of ELEMENT are:
ELEMENT(1,1) = 2
ELEMENT(1,2) = 5
ELEMENT(1,3) = 1
ELEMENT(2,1) = 8
ELEMENT(2,2) = 0
ELEMENT(2,3) = 4
You can nest table and record assignment by using multiple pairs of braces, as shown
in the next example. Assume the following declaration:
01 rec6.
02 array Native-2 occurs 10 times.
02 another2 Native-2.
The following command assigns and prints the two tables in record rec6:
eInspect 1,1032: print rec6={{1,2,3,4,5,6,7,8,9,10}12}
$1 =
ARRAY = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
ANOTHER2 = 12