Informix Error -4007
-4007 Record member "name" is undefined.
This statement refers to record.name. While the variable record is indeed a record, name is not the name of one of its component fields. Find the definition of record (it might be in the GLOBALS file), and verify the names of its fields. Then correct the spelling of name.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4007 fires when code references record.name but name isn't one of record's component
fields — per the official guidance, record is indeed a record, but the named field doesn't
exist on it.
- A field name referenced on a record that doesn't have a field by that name, per the official guidance — the direct, only cause.
Solutions / Resolution
- Find the definition of
record(it might be in theGLOBALSfile), per the official guidance. - Verify the names of its fields, and correct the spelling of
name, per the official guidance.
Examples
Referencing a nonexistent record field
DEFINE rec RECORD
order_id INTEGER,
order_date DATE
END RECORD
LET x = rec.order_status
-- -4007: rec has no field named order_status
Corrected
LET x = rec.order_date
Diagnostic Checks
- Check the record's definition (locally or in
GLOBALS), and confirm the referenced field name exists and is spelled correctly.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4007 in this set yet.
A referenced record field doesn't exist on that record — check the record's definition and correct the field name's spelling.