Program hangs in _iqlocate_cursor
Posted in 2000
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Folks, I have an ESQL/C program running on AIX 4.2.1.0, in which I try to prepare a sql statement and declare a cursor. The program just hangs on the declare statement. The debugger (dbx) tells me it is hanging in _iqlocate)cursor(??, ??) routine. Could someone point out how I could debug this? The code snippet where it hangs is EXEC SQL prepare ChkUpdJobStmt from "select count(*) from opmgrque where (command = ? or command = ?)and archid = ? and state = ?"; checkError(sqlca.sqlcode, "QueuePLSJob 1a"); EXEC SQL declare ChkUpdJobCur cursor for ChkUpdJobStmt; checkError(sqlca.sqlcode, "QueuePLSJob 1b"); It hangs on the second EXEC SQL statement. Im using Online 7.20.UC2 and ESQL/C 7.20.UC2 on an AIX 4.2.1.0. Any and all help appreciated. Thanks, Raj. Sent via Deja.com http://www.deja.com/ Before you buy.
rmalhotra@my-deja.com wrote: > I have an ESQL/C program running on AIX 4.2.1.0, in which I try to > prepare a sql statement and declare a cursor. The program just hangs on > the declare statement. The debugger (dbx) tells me it is hanging in > _iqlocate)cursor(??, ??) routine. Could someone point out how I could > debug this? The code snippet where it hangs is > > EXEC SQL prepare ChkUpdJobStmt from > "select count(*) from opmgrque where (command = ? or command = ?)and > archid = ? and state = ?"; > checkError(sqlca.sqlcode, "QueuePLSJob 1a"); > > EXEC SQL declare ChkUpdJobCur cursor for ChkUpdJobStmt; > checkError(sqlca.sqlcode, "QueuePLSJob 1b"); > > It hangs on the second EXEC SQL statement. Im using Online 7.20.UC2 and > ESQL/C 7.20.UC2 on an AIX 4.2.1.0. I'm pretty sure the version 7.20 is not deemed Y2K-compliant and that therefore you should be upgrading. Next, I assume that you are actually compiling this code, not trying to transfer the generated C code from some other version of ESQL/C. The _iqlocate_cursor() has had different numbers of arguments (2..4) at various times in various pre-releases; I've lost track of which variants got released to the unsuspecting public. If you still have problems (you probably do), then it is going to be difficult to track the source down. Is ESQL/C busy chewing up the CPU when it hangs, or is it passive? I assume that its very busy but achieving nothing. Most likely, this means there issome memory corruption somewhere, so perhaps the code is searching a linked list of cursor and statement names and they are linked in a circle, somehow, and it isn't realizing it. I assume you are not using threads or anything? If you're really sure you have no memory management problems in your code, then upgrade is the main solution. No-one at Informix is likely to dive into debugging such an old version of ESQL/C. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN #include <disclaimer.h>