Informix Error -642
-642 Family name must be a character string.
The optical family name that is specified in the RESERVE or RELEASE statement must be either a character string, or a host or procedural variable that evaluates to a character string. If you specified a character string, check that you enclosed it in quotes.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-642 fires when a RESERVE/RELEASE statement's family name isn't a character string (or a
host/procedural variable evaluating to one) — per the official guidance, an unquoted identifier
or a non-string value in that position triggers this error.
- An unquoted family name, per the official guidance's specific suggested check — the name needs to be enclosed in quotes to be recognized as a character-string literal.
- A host or procedural variable of the wrong type passed where the family name is expected, per the official guidance — it must evaluate to a character string.
Solutions / Resolution
- Check that a character-string family name is enclosed in quotes, per the official guidance, if a literal was intended.
- Confirm a host/procedural variable used for the family name is character-string typed, per the official guidance, if a variable was used instead of a literal.
Examples
An unquoted family name
RESERVE family optical_family1;
-- -642: optical_family1 needs quotes to be a character-string literal
Corrected
RESERVE family 'optical_family1';
A variable of the wrong type
DEFINE v_family INT; -- wrong type
RESERVE family :v_family;
-- -642: v_family must be a character-string type
Diagnostic Checks
- Check whether the family name is a quoted character-string literal, or, if a variable, that its declared type is character-string.
Related Errors / Related Topics
- -641 — "Cannot reserve/release family on non-optical media." A related
RESERVE/RELEASEerror, about what the name refers to rather than its syntax/type.
A syntax/type issue, not a naming issue — check for missing quotes or a wrongly-typed variable.