Native Inspect Manual (H06.07+)

Using Native Inspect With COBOL Programs
Native Inspect Manual528122-006
3-10
Evaluating Expressions
Evaluating Expressions
Native Inspect supports COBOL arithmetic expressions and a subset of COBOL
conditional expressions, and follows COBOL rules for evaluating these expressions.
The COBOL arithmetic operators are:
+, -, *, /, and **
Conditional expressions use these operators:
GREATER, NOT GREATER, LESS THAN, NOT LESS THAN, EQUAL TO, NOT
EQUAL TO
and also the logical operators AND and OR. You can also use the symbols >, <, <>, <=,
>=.
If a variable is specified as the result of an expression, Native Inspect stores as much
of the result as possible as allowed by the variable’s type.
Native Inspect does not allow the use of intrinsic functions, class conditions, sign
conditions, switch-status conditions, or abbreviated conditions in expressions.
Displaying Types
You display the type of a COBOL data item in Native Inspect by using the ptype and
whatis commands. Wherever possible, types are displayed as declared in the COBOL
program, with these exceptions:
Level 88 condition names are shown as type "bool", since there is no
corresponding COBOL type.
The PICTURE string shown for edited items is PIC X(length).
Machine-Level Debugging
Native Inspect provides a full set of commands for machine-level debugging. These
commands enable you to perform such low-level tasks as examining memory,
examining registers, and listing machine-level instructions. One such command, the x
command, provides a special form for use with COBOL programs. The x command,
when used with the ADDRESS OF clause, is useful for generating memory dumps.
This command has the form
x /format ADDRESS OF variable
where format specifies a repeat count, the format to use, and the size of the variable
to be examined; and variable is a variable to be used as the starting address of the
memory dump.
For more information about the x command, see x command on page 4-85.