Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
SCREEN COBOL Source Program
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
2-21
Complex Conditions
•
If the nonnumeric operand is an elementary data item or a nonnumeric literal, the
numeric operand is treated as though it were moved to an elementary
alphanumeric data item of the same size as the numeric data item; the content of
this alphanumeric data item is then compared to the nonnumeric operand.
•
If the nonnumeric operand is a group item, the numeric operand is treated as
though it were moved to a group item of the same size as the numeric data item;
the content of this group item is then compared to the nonnumeric operand.
Comparison of Equal-Sized Operands
If the values of operands are equal in size, characters in corresponding positions are
compared starting from the high order end. The comparison continues until either a
pair of unequal characters is found or the low order end is reached. The values are
equal when all pairs of characters are the same.
The first pair of unequal characters is compared to determine their relative position in
the collating sequence. The value having the character that is higher in the collating
sequence is the greater value.
Comparison of Unequal-Sized Operands
If the values of operands are unequal in size, comparison proceeds as though the
shorter operand were extended on the right by sufficient spaces to make the operands
equal in size.
Sign Condition
The sign condition determines whether or not the algebraic value of an arithmetic
expression is greater than, less than, or equal to zero.
Sign condition syntax is:
arithmetic-expression
must have at least one variable.
When NOT is included, the word NOT and the next keyword specify one sign condition
that defines the algebraic test to be run for truth value. NOT ZERO is a truth test for a
nonzero, positive, or negative value. An item is positive if its value is greater than zero,
negative if its value is less than zero, and zero if its value is equal to zero.
Complex Conditions
Complex conditions are formed by using simple conditions, combined conditions
and/or complex conditions with logical connectives AND or OR, or by negating these
conditions with the keyword NOT. The truth value of a complex condition, whether or
not the value is enclosed in parentheses, is that truth value which results from the
arithmetic-expression
[ IS ] [ NOT ] { POSITIVE }
{ NEGATIVE }
{ ZERO }










