Inspect Manual
Using Inspect With COBOL and SCREEN COBOL
Inspect Manual—429164-006
10-8
Expressions
However, if you compile your program using the WITH DEBUGGING MODE clause in
the SOURCE COMPUTER paragraph, these data item is available:
DEBUG-ITEM is mainly used for non-interactive debugging, but the PROGRAM-
STATUS and GUARDIAN-ERR registers can be helpful in debugging with Inspect.
Expressions
Here is the syntax you use to create COBOL expressions in Inspect.
Usage Considerations
Operator precedence is the same as the precedence defined in COBOL.
When you use the minus sign (-) as an operator, you must delimit it with spaces.
Inspect does not support these in expressions:
Class conditions, such as ALPHABETIC and NUMERIC
Sign conditions, such as NEGATIVE and POSITIVE
Figurative constants, such as HIGH-VALUES, SPACES, and so on
Abbreviated compound conditions, such as (A > B OR C)
DEBUG-ITEM Is a part of the ANSI Standard debugging mechanism. For more
information, see the description of the USE statement in the
COBOL85 for NonStop Systems Manual.
expression:
condition [ { AND | OR } condition ]...
condition:
[ NOT ] { simple-exp [ rel-op simple-exp ]... }
{ level-88-condition }
rel-op:
[ NOT ] { > = < GREATER EQUAL LESS }
simple-exp:
[ + | - ] term [ { + | - } term ]...
term:
factor [ { * | / } factor ]...
factor:
primary [ **primary ]
primary: one of
data-location
"@data-location"
number
( expression )