RPG (IBM i / AS/400) · File status code
What does Status Code 00101 mean in RPG (IBM i / AS/400)?
The SQRT operation code (or %SQRT built-in) was called with a negative numeric argument, which has no real-number result.
The SQRT operation code (or %SQRT built-in) was called with a negative numeric argument, which has no real-number result.
Check that the argument is zero or positive before calling SQRT, and treat a negative input as an upstream data or business-logic bug rather than something to paper over here.