Informix Error -453
-453 'loc_close()' failed.
The loc_close() function provided in the locator structure for a BYTE or TEXT value in this statement was called and returned a negative return code. When the value is located using user-supplied functions (loc_loctype contains LOCUSER), this function is part of the program, and you have to diagnose its problems yourself. When the value is located in a file (loc_loctype contains LOCFILE or, in a 4GL program, the variable has been located in a file), this error indicates that the system-supplied loc_close() function was not able to close the file.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-453 is the close-side counterpart of -452: loc_close(), invoked as part of a BYTE/TEXT
locator operation, returned a negative code. As with -452, the specific cause depends on which
implementation is in play:
- When using a user-supplied locator function (
loc_loctypecontainsLOCUSER), the failure is entirely application-defined — diagnosing it is the application developer's own responsibility. - When the value is located in a file (
loc_loctypecontainsLOCFILE), the system- suppliedloc_close()couldn't successfully close the file — potentially from a disk-level issue, a file already closed/invalidated elsewhere, or similar OS-level conditions.
Solutions / Resolution
- For a user-supplied locator function, add diagnostic logging inside it to determine why
loc_close()is returning a negative code. - For a file-based locator, check for disk-level issues or anything else that could prevent a normal file close on the OS in question.
- Check whether the file handle was already closed or invalidated elsewhere in the
application before this
loc_close()call, which could explain an unexpected failure.
Examples
Checking for a double-close or already-invalidated handle
/* Confirm the file handle backing this locator wasn't already
closed or invalidated by other application logic before this
loc_close() call. */
Diagnostic Checks
- Determine whether a user-supplied or system-supplied (file-based)
loc_close()is in use. - For a user-supplied function, add logging inside it to find the actual failure reason.
- For a file-based locator, check for disk-level issues or a prior double-close/invalidation.
Related Errors / Related Topics
- -452 — "'loc_open()' failed." The open-side counterpart of this same locator-function- failure family.
- -451 — "Locator buffer size too small." A related locator-operation error, about buffer sizing rather than the close step.
Same diagnostic split as -452 — determine whether a user-supplied or system-supplied
loc_close() is involved, since the troubleshooting path differs significantly between the two.