Native Inspect Manual (H06.04+)
Using Native Inspect With COBOL Programs
Native Inspect Manual—528122-005
3-8
Assigning Values to Character Strings
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.
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).










