Informix Error -4098
-4098 Type of expression that is expanded must be class or record.
This statement refers to name.* (or uses THRU notation); however, the name it refers to is not declared as a record or as an object of some class. Check the spelling of the name, and review its declaration.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4098 fires when name.* (or THRU notation) is used, but name isn't declared as a record
or as an object of some class — per the official guidance, expansion only applies to records
and class objects.
.*/THRUused on a name that isn't a record or class object, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the spelling of the name, per the official guidance.
- Review its declaration, per the official guidance, to confirm it's a record or class object.
Examples
Expanding a plain variable
DEFINE qty INTEGER
DISPLAY qty.*
-- -4098: qty is INTEGER, not a record or class object
Corrected
DEFINE rec RECORD
qty INTEGER,
price DECIMAL
END RECORD
DISPLAY rec.*
Diagnostic Checks
- Check the declaration of any name used with
.*/THRU, and confirm it's a record or a class object.
Related Errors / Related Topics
- -4030 — "Warning: Cannot further expand an expanded expression." A related
.*expansion error, about applying.*more than once rather than expanding a non-record/class name. - -4072 — "Cannot expand structure with no members." A related
.*expansion error, about a valid class/object with no public members rather than a name that isn't a record/class at all.
.*/THRU is used on a name that isn't a record or class object — check its declaration.