Sign condition

The sign condition determines whether the algebraic value of a numeric operand is greater than, less than, or equal to zero.

Format: sign condition

Read syntax diagramSkip visual syntax diagramoperand-1ISNOTPOSITIVENEGATIVEZERO

Must be defined as a numeric identifier, or as an arithmetic expression that contains at least one reference to a variable. operand-1 can be defined as a floating-point identifier.

The operand is:

  • POSITIVE if its value is greater than zero
  • NEGATIVE if its value is less than zero
  • ZERO if its value is equal to zero

An unsigned operand is either POSITIVE or ZERO.

One algebraic test is executed for the truth value of the sign condition. For example, NOT ZERO is regarded as true when the operand tested is positive or negative in value.

The results of the sign condition test depend on the setting of the NUMPROC compiler option. For details, see NUMPROC in the Enterprise COBOL Programming Guide.