Informix Error -4429: Report and function parameters cannot be arrays.
Cause and resolution
Report and function parameters cannot be arrays.
You cannot pass a whole array as a parameter of a function. You can pass an individual element of the array by using a subscript. Possibly the array that is causing this error is one component of a record variable that is being passed using asterisk notation. Only 4GL returns this error.
-4429 Parameters cannot be arrays, records with array members, or constants.
You cannot pass a whole array or a constant as a parameter of a function. You can pass an individual element of an array by using a subscript. Possibly the array that is causing this error is one component of a record variable that is being passed using asterisk notation. Only NewEra returns this error.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4429 covers two related variants, per the official guidance:
-
4GL: whole arrays can't be passed as function/report parameters — pass an individual element by subscript instead; a common trigger is an array component of a record being passed via asterisk notation.
-
NewEra: parameters can't be arrays, records with array members, or constants — the same individual-element rule applies, and constants also can't be passed as parameters.
-
A whole array passed as a function/report parameter, per the official guidance — the direct, only cause.
-
A record with an array member passed via asterisk notation, per the official guidance — a specifically named contributing cause.
-
(NewEra only) A constant passed as a parameter, per the official guidance — an additional named cause.
Solutions / Resolution
- Pass an individual array element by subscript instead of the whole array, per the official guidance.
- (NewEra) Avoid passing constants as parameters.
Examples
Passing a whole array as a parameter
DEFINE items ARRAY[10] OF INTEGER
CALL processAll(items)
-- -4429: items is a whole array
Corrected
CALL process(items[1])
Diagnostic Checks
- Check every function/report call's arguments for a whole array (or a record whose asterisk expansion includes an array member, or in NewEra, a constant), and pass individual elements instead.
Related Errors / Related Topics
- -4091 — "Cannot assign to or refer to an array as a whole." A related array-usage restriction, about assignment rather than parameter passing.
- -4164 — "The variable is too complex a type to be used in an assignment statement." A related complex-type restriction covering the same general array/BLOB principle.
A whole array (or a record with an array member, or in NewEra a constant) is passed as a function/report parameter — pass an individual element instead.