Re: 4GL on HPUX: compile problems
Posted in 1998
David Coburn wrote: > > Howdy. I'm migrating lots of 4GL code from an old Sequent/Unisys machine > with 4GL 4.x to HPUX 10.20 and 4GL 6.x (sorry, no exact version numbers > right now, but these should be close enough). Everything is fine until I > get to one section of code that has embedded ESQL/C code in it. The > problem is that when compiled and run I get a -404 error, or "Statement not > available." (The error indicates that the statement has been previously > freed in the code. This is (a) not true because the preceeding two > statements did the declare and prepare; and (b) the cursor name is unique > in the source, so I don't think it is getting confused with an earlier > cursor name.) > Just a thought. This smacks of a cursor name mangling problem along the lines of; PREPARE statmt_1 from "UPDATE tablea set column1 to ? WHERE CURRENT OF a_curs" DECLARE a_curs OURSOR FOR SELECT stuff FOR UPDATE FOREACH a_curs EXECUTE statmt_1 USING some_value END FOREACH The ECECUTE statement fails with cursor not found because of the way Informix ensures uniquness of cursors by mangling their names. You can sometimes get around the problem (in 4GL) by compiling with -globcurs, but I have no idea how to do it in E/SQL. The name mangling doco is in the TOOLREL* release notes. Excuse me if this has nothing to do with the problem :) -- Bryan Tonnet batonnet@phase4.com.au