Informix Error -4079: Operation is not allowed in index expressions.
Cause and resolution
Operation is not allowed in index expressions.
An operation such as expansion (.*), COPY, NEW, or THRU was attempted in an index expression.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4079 fires when an index expression uses an unsupported operation — per the official
guidance, expansion (.*), COPY, NEW, or THRU can't appear inside an index expression.
- An index expression using
.*,COPY,NEW, orTHRU, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the unsupported operation from the index expression, computing its value separately if needed before using it as an index.
Examples
An unsupported operation inside an index
LET x = arr[NEW SomeClass]
-- -4079: NEW cannot appear inside an index expression
Corrected
DEFINE obj SomeClass
LET obj = NEW SomeClass
LET x = arr[obj.index]
Diagnostic Checks
- Check every index expression for
.*,COPY,NEW, orTHRU, and compute those values outside the index instead.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4079 in this set yet.
An index expression uses .*, COPY, NEW, or THRU, which aren't allowed there — compute
the value separately first.