Native Inspect Manual (H06.07+)

Using Native Inspect With COBOL Programs
Native Inspect Manual528122-006
3-9
Assigning Values to Character Strings
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:
set ELEMENT=0
The command
set ELEMENT={0}
sets only ELEMENT (1,1) to zero.
Assigning Values to Character Strings
You reference a character string by specifying the string name. The reference is to the
entire string. Native Inspect does not support reference modifier notation. For example,
consider the following declaration:
01 REC.
02 MYSTRING PIC X(10).
The following command assigns a value to the entire string MYSTRING:
set MYSTRING="Hello!!!!!"
If, in this example, you specify
set MYSTRING="Hello"
the character string is padded with spaces on the right according to the same rules
used by the COBOL MOVE statement.
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 print
the value:
(einspect 0,434): set ASTRING “AB” & “CD”
(einspect 0,434): print ASTRING
$6 = “ABCD”