sysVar.overflowIndicator

The system variable sysVar.overflowIndicator is set to 1 when arithmetic overflow occurs. By checking the value of this variable, you can test for overflow conditions.

After detection of an overflow condition, sysVar.overflowIndicator is not reset automatically. You must include code in your program to reset sysVar.overflowIndicator to 0 before performing any calculations that may trigger overflow checks.

You can use sysVar.overflowIndicator in these ways:

The characteristics of sysVar.overflowIndicator are as follows:

Primitive type

NUM

Data length

1

Is value always restored after a converse?

Yes

Example

  sysVar.overflowIndicator = 0;
  sysVar.handleOverflow = 2;
  a = b;
  if (sysVar.overflowIndicator = 1) 
    add errorrecord;
  end

Related reference
Assignments
Exception handling and status (system words)
sysVar.handleOverflow