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

03 TABLE-2 OCCURS 5 TIMES.
04 ELEMENT PIC X.
(eInspect 1,821):print length MASTER
$2 = 25
(eInspect 1,821):print length (MASTER.TABLE-1(1))
$3 = 5
(eInspect 1,821):print length TABLE-2(1,1)
$4 = 1
For tables with a variable upper bound, the maximum length of the table is displayed irrespective
of the value of the data item specified in the DEPENDING ON clause. For example, consider the
following declaration:
01 MASTER.
03 ITEM PIC 99 VALUE 7.
03 TABLE4 OCCURS 5 TO 10 TIMES DEPENDING ON ITEM.
05 ITEM-5 PIC 99.
(eInspect 1,807):print length MASTER
$6 = 22
Handling of REDEFINES and RENAMES
Native Inspect treats variables named in a REDEFINES or RENAMES clause the same as other
variables in the record. Thus, when Native Inspect displays a record, the REDEFINE and RENAME
variables are also shown. For example, consider the following declaration:
01 REDEF.
02 NAME PIC A(30).
02 OTHER-NAME REDEFINES NAME.
03 FIRST-NAME PIC A(20).
03 LAST-NAME PIC A(10).
66 FNAME RENAMES FIRST-NAME.
66 LNAME RENAMES LAST-NAME.
The print REDEF command displays all items in the record, including OTHER-NAME, FNAME,
and LNAME, as follows:
NAME=...
OTHER-NAME=
FIRST-NAME=
LAST-NAME=...
FNAME=...
LNAME=...
Assigning Values to Data Items
Assigning Values to Variables
Native Inspect provides two ways of assigning values to data items:
Using the set command.
Using the print data-item = value command.
Native Inspect follows COBOL rules for assigning values to numeric and alphanumeric variables.
Some considerations are:
Native Inspect follows COBOL rules for truncation and padding, but ignores the JUSTIFIED
clause.
When assigning a numeric value to an alphanumeric item, the numeric item is treated as an
alphanumeric item with digits moved from left to right.
Native Inspect does not allow assignment to EDITED data items.
Handling of REDEFINES and RENAMES 51