Native Inspect Manual (H06.13+, J06.03+)
(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
If, in an assignment, you specify more values than there are elements in the table, an error is
generated. If you specify fewer values, the assignment terminates when all values in the list are
used.
You cannot assign a value to an entire table or record by specifying a single value. For example,
assuming the preceding declaration, the following command generates an error:
eInspect n,n:set ELEMENT=0
The following command sets only ELEMENT (1,1) to zero:
eInspect n,n:set ELEMENT={0}
Assigning Values to Character Strings
The following syntax is supported by Native Inspect:
01 REC.
02 MYSTRING PIC X(10).
The following command assigns a value to the entire string MYSTRING:
(eInspect 3,1012): set MYSTRING="Hello!!!!!"
If, in this example, you specify the following command, the character string is padded with spaces
on the right according to the same rules used by the COBOL MOVE statement:
(eInspect 3,1012): set MYSTRING="Hello"
The following command prints 2 characters starting at index 1:
(eInspect 3,1012): print MYSTRING(1:2)
The following command prints a substring of MYSTRING starting at index 2 until the end:
(eInspect 3,1012): print MYSTRING(2:)
The following command modifies two characters:
(eInspect 3,1012): print MYSTRING(1:2) = "XX"
Native Inspect supports the COBOL string concatenation operator (&). For example, assume the
following declaration:
01 REC
02 ASTRING PIC X(4).
The following commands assign a value to ASTRING using concatenation, then displays the string
value:
(einspect 0,434):set ASTRING “AB” & “CD”
(einspect 0,434):print ASTRING
$6 = “ABCD”
Evaluating Expressions
Native Inspect supports COBOL arithmetic expressions and a subset of COBOL conditional
expressions, and follows COBOL rules for evaluating these expressions as follows:
• Arithmetic operators are as follows:
+
-
*
/
**
• Conditional expressions use the following operators:
Evaluating Expressions 53










