Informix Error -1348: An attempt was made to divide by zero.
Cause and resolution
An attempt was made to divide by zero.
Zero cannot be a divisor. In some cases, this error arises because the divisor is a character value that does not convert properly to numeric.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1348 is the 4GL-program equivalent of -1202: it fires when a division's divisor evaluates to zero — per the official guidance, this sometimes arises because the divisor is a character value that doesn't convert properly to numeric.
- A genuine zero-value divisor, per the official guidance — the same direct cause as -1202.
- A character divisor that doesn't convert cleanly to numeric, per the official guidance's specifically named case.
Solutions / Resolution
- Check the divisor for zero before dividing, per the official guidance — see -1202 for the full detail.
- If the divisor comes from a character value, verify it actually converts to a valid, nonzero number, per the official guidance's named failure mode.
Examples
N/A
This is the 4GL-program wording of -1202's condition — see -1202's examples for the underlying mechanism.
Diagnostic Checks
- Identify the specific divisor value (and its source) at the point of failure, per -1202's diagnostic approach.
Related Errors / Related Topics
- -1202 — "An attempt was made to divide by zero." The non-4GL wording of this same zero-divisor condition.
The 4GL-program wording of -1202's zero-divisor condition — see -1202 for the full detail.