Native Inspect Manual (H06.07+)

Using Native Inspect With COBOL Programs
Native Inspect Manual528122-006
3-7
Assigning Values to Data Items
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 command print data-item = value.
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.
If the name of a variable is the same as a Native Inspect option recognized by the
set command, you must use either the print command with the assignment
operator or the variable clause of the set command to assign a value to the
variable.
The maximum size of a numeric literal is 18 decimal digits, 16 hexadecimal digits,
and 22 octal digits.
Changing the Radix of Numeric Literals
The default radix of a numeric literal is base 10. You can use the following notations to
change the value of a numeric literal:
Oxvalue to specify a hexadecimal value
Onumber to specify an octal value
Considerations
Native Inspect does not support he COBOL syntax for hexadecimal literals
(Hvalue”).
You cannot change the radix of an alphanumeric literal.