Informix Error -4418: The variable used in the INPUT ARRAY or DISPLAY ARRAY statement must be an array.
Cause and resolution
The variable used in the INPUT ARRAY or DISPLAY ARRAY statement must be an array.
The name following the words DISPLAY ARRAY or INPUT ARRAY must be that of an array of records. Check the spelling of the name. If it is as you intended, find and inspect the DEFINE statement to see why it is not an array. (If you want to display or input a simple variable or a single element of an array, use the DISPLAY or INPUT statement.)
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4418 fires when INPUT ARRAY/DISPLAY ARRAY is given a name that isn't an array of
records — per the official guidance, check the spelling, and if correct, review the DEFINE
statement.
INPUT ARRAY/DISPLAY ARRAYgiven a name that isn't an array of records, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the spelling of the name, per the official guidance.
- If it's as intended, inspect the
DEFINEstatement to see why it isn't an array, per the official guidance. - For a simple variable or single array element, use
DISPLAY/INPUTinstead, per the official guidance.
Examples
DISPLAY ARRAY on a non-array
DEFINE rec RECORD
order_id INTEGER
END RECORD
DISPLAY ARRAY rec TO scr.*
-- -4418: rec is a single RECORD, not an array of records
Corrected
DEFINE recs ARRAY[10] OF RECORD
order_id INTEGER
END RECORD
DISPLAY ARRAY recs TO scr.*
Diagnostic Checks
- Check the
DEFINEstatement of the name used withINPUT ARRAY/DISPLAY ARRAY, and confirm it's genuinely an array of records.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4418 in this set yet.
INPUT ARRAY/DISPLAY ARRAY was given a name that isn't an array of records — check its
declaration, or use DISPLAY/INPUT for a single variable/element.