Informix Error -9050: The user variable name is of type type. The value entered is out of range or cannot be converted to that type.
Cause and resolution
The user variable name is of type type. The value entered is out of range or cannot be converted to that type.
A value was entered in response to a PROMPT statement, which stores the value in a variable of the name and type shown. However, it was impossible to convert the entered value to the data type of the variable (see the discussion of error -9049 for details on conversion). Rerun the report and enter appropriate data (also consider revising the prompt string to better guide the user).
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9050 fires when a value entered in response to a PROMPT statement can't be converted to the data type of the variable it's stored in — per the official guidance.
- An entered value that's out of range for, or can't be converted to, the variable's type, per the official guidance — the direct, only cause (see -9049 for the underlying conversion rules).
Solutions / Resolution
- Rerun the report and enter appropriate data, per the official guidance.
- Consider revising the prompt string to better guide the user, per the official guidance.
Examples
An out-of-range PROMPT response
PROMPT "Enter quantity: " FOR quantity -- quantity is SMALLINT
-- user enters "99999999" -- -9050: out of range for SMALLINT
Diagnostic Checks
- Check the variable's declared type and valid range, and revise the prompt string if users repeatedly enter invalid values.
Related Errors / Related Topics
- -9049 — "A value entered as a command line parameter cannot be converted to the data type type." The same class of conversion error, for command-line parameters rather than PROMPT-entered values; also documents the underlying per-type conversion rules.
A PROMPT-entered value was out of range or couldn't be converted to the target variable's type — rerun and enter valid data.