When the overflow error suppression feature is set by the pd_overflow_suppress option of the system common definition, the following conditions do not generate an error (HiRDB treats the result of the operation that generates the overflow as the null value and continues processing):
The following types of overflows are subject to overflow error suppression:
Table 2-86 Scalar functions subject to overflow error suppression
Classification | Scalar function | Scalar function type |
---|---|---|
Conversion function | DEGREES | System-defined scalar function |
NUMEDIT | ||
STRTONUM | ||
Mathematical function | ABS | System-built-in scalar function |
MOD | ||
CEIL | System-defined scalar function | |
COSH | ||
EXP | ||
FLOOR | ||
POWER | ||
ROUND | ||
SINH | ||
TAN | ||
TANH | ||
TRUNCYEAR | ||
Date manipulation | ADD_INTERVAL | |
NEXT_DAY | ||
ROUNDMONTH |
An error does occur in the following cases even when the overflow error suppression feature is in effect:
When overflow occurs, a 'W' warning is set to SQLWARNB in the SQL Communications Area. Whether or not overflow has occurred can be determined by referencing SQLWARNB.
Shown below is an example of the processing that occurs when the overflow error suppression feature is in effect. The examples are based on the following stock control table (CONTROL):
Note: The "Unit price" (PRICE), "Quantity" (QUANTITY), and "Total" (TOTAL) columns must be of the INTEGER data type; the "Total" (TOTAL) column must be a NOT NULL constrained column.