Informix Error -4487: It is not possible to mix parameter and local record definitions where the record contains variables of type TEXT or BYTE. Make a second definition for the local record variable.
Cause and resolution
It is not possible to mix parameter and local record definitions where the record contains variables of type TEXT or BYTE. Make a second definition for the local record variable.
In this report body, use separate DEFINE statements for parameters of the report and for local variables of any type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4487 fires when a report body blends a parameter definition and a local variable definition
in one DEFINE, and the resulting record contains a TEXT/BYTE component — per the
official guidance, parameters and local variables need separate DEFINE statements in this
case.
- A single
DEFINEmixing report parameters and local variables for a record containingTEXT/BYTE, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use separate
DEFINEstatements for the report's parameters and for its local variables, per the official guidance.
Examples
Mixed parameter/local definitions
REPORT myreport(rec)
DEFINE rec RECORD
order_id INTEGER,
notes TEXT
END RECORD, temp_var INTEGER
-- -4487: parameter and local mixed in one DEFINE
Corrected
REPORT myreport(rec)
DEFINE rec RECORD
order_id INTEGER,
notes TEXT
END RECORD
DEFINE temp_var INTEGER
Diagnostic Checks
- Check every report's
DEFINEstatements for a mix of parameter and local declarations involving aTEXT/BYTE-containing record, and split them into separateDEFINEstatements.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4487 in this set yet.
A report mixes parameter and local record definitions in one DEFINE where the record has a
TEXT/BYTE component — use separate DEFINE statements.