Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Eduardo Bispo's ESQL/C monitoring program (IDS 7.31 on AIX 5.3, CSDK 2.50) sometimes failed an INSERT with error 206 and ISAM error 111. Another poster said Informix would not report a missing table that exists, so the program was probably connected to the wrong database or instance, or the table was dropped or not yet created, and suggested a dummy-table test. Unresolved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
I created a small ESQL/C program to colect data from some system
catalog tables, do some calculations and insert the results in a table
on another database for monitoring and historial purposes. Basically,
the program does some colects and put in a temp table. When the program
does the calculation from the temp table, it fetches the result rows to
variables and uses them to insert in another table. But sometimes the
insert operation fails with the SQL Error 206 and the ISAM Error 111
and I did not find out why. Here is the insert code:
EXEC SQL DECLARE topcol_cursor CURSOR FOR topcol_sql;
EXEC SQL OPEN topcol_cursor;
for (;;) {
EXEC SQL FETCH topcol_cursor INTO :v_mas_sid,
:v_mas_username,
:v_mas_cpu_perc,
:v_mas_tty;
if (sqlca.sqlcode == 100 || v_rank > 5)
break;
EXEC SQL insert into mostactsess values
("TODAY",:str_hora,:v_rank,:v_mas_username,:v_mas_sid,:v_mas_tty,:v_mas_cpu_perc);
if (sqlca.sqlcode != 0) {
fprintf( stderr,
"Error: %d(%d) in the INSERT.\\n",
sqlca.sqlcode,
sqlca.sqlerrd[1]);
return 7;
}
v_rank++;
}
---------------------------------
Environment:
OS: AIX 5.3
RDBMS: IDS 7.31.UD1X5
ESQL: 9.40.UC2 (CSDK 2.50.UC2)
Any help is welcomed.
Best regards.
Eduardo A. Bispo
david@smooth1.co.uk escreveu:
> What does the manual say ISAM error number 111 means?
>
> On a UNIX system run
>
> finderr 111
>
> ...
The 206 error says:
-206 The specified table <table-name> is not in the database.
And the 111 error says:
-111 ISAM error: no record found.
The ISAM processor cannot locate the requested record. For C-ISAM
programs, no record was found with the requested index value or record
number, depending on the retrieval mode in use. Make sure that the
correct index is in use. For SQL products, see the SQL error message or
return code. Probably no row was found for this query.
The tables (the temp and the regular) are there and if the returned
record set is empty the program is suposed to stop the loop for. I do
not know why this error.
Regards
Eduardo.
Informix will not say the table is not there when it is.
You must be connected to the wrong database. (perhaps the wrong
instance)?
Or the table has not been created at the table the code runs
orthe table has been dropped by another session at that time.
Create a dummy table with a unique name in the database you should be
accessing and try to insert into that. That will show if you are
connected to
the right database.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.