A Datacom table can be successfully accessed in native non-SQL mode but, when trying to read the same data via an SQL application, an SQLRC -999 is returned to the application.
PXX dump shows the following error message:
S0004 SQLSTATE 56S19 OCCURRED WITH SQL ERROR CODE -999 IN PROG keyDef AT LINE 1453 (SORTPRP)
S0004 ERROR MESSAGE TEXT: INTERNAL ERROR (keyDef @ LINE 1453): rowLn bad
Similarly, an SQL query executed from CA Dataquery returns:
DQ093E - INTERNAL ERROR (keyDef@ LINE 1453): rowLn bad
Release: 15.1
Component: Datacom SQL Option
This error is usually returned because one (or both) of the following reasons: