Informix Error -475
-475 In a GET statement, if DATA is null, then INDICATOR must be specified.
This X/Open rule indicates that you must request the INDICATOR value in the GET DESCRIPTOR statement when DATA is null.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-475 is an X/Open-mode structural rule for GET DESCRIPTOR: if the DATA field target is
NULL (meaning the caller doesn't want the actual data value returned, just other metadata), the
statement must also specify an INDICATOR field — the two are paired for this specific case,
similar in spirit to -467's indicator-variable requirement in embedded SQL.
- A
GET DESCRIPTORstatement withDATAset toNULLand noINDICATORfield specified — the direct, only cause. - Code written without this X/Open-specific pairing rule in mind, perhaps ported from native Informix mode or a different API where the requirement doesn't apply the same way.
Solutions / Resolution
- Specify the
INDICATORfield wheneverDATAisNULLin aGET DESCRIPTORstatement, per the official guidance — this is a required pairing under the X/Open rules. - If the actual data value is needed, don't set
DATAtoNULL— supply a genuine target for it instead, in which caseINDICATORisn't mandatory (though still often useful).
Examples
Supplying INDICATOR when DATA is NULL
GET DESCRIPTOR 'desc1' VALUE 1
:col_name = NAME, :col_indicator = INDICATOR;
-- DATA isn't requested here, so INDICATOR is required
The disallowed combination
GET DESCRIPTOR 'desc1' VALUE 1 :col_name = NAME;
-- -475 if DATA was implicitly/explicitly null and no
-- INDICATOR field was specified
Diagnostic Checks
- Check whether
DATAisNULLin the failingGET DESCRIPTORstatement. - Confirm whether
INDICATORis also specified — it must be, wheneverDATAisNULL.
Related Errors / Related Topics
- -474 — "Unknown field type." A related X/Open descriptor-field restriction, about valid
field type keywords rather than this specific
DATA/INDICATORpairing rule. - -467 — "Indicator object is missing." A conceptually similar indicator-variable
requirement, in embedded SQL's
-icheckcontext rather than X/OpenGET DESCRIPTOR.
This is a specific X/Open pairing rule — whenever DATA is NULL in a GET DESCRIPTOR
statement, INDICATOR must also be specified.