Error -1235 (misleading message)
Posted in 1997
Well, this is one of those misleading error messages I suppose.... My program is written in 4GL and ESQL/C and this is probably totally unrelated to why it started core-dumping (I must be doing something wrong), but it consistently core-dumps when I call retflo() with a value other than zero....no matter if it is hard-coded, cast to a float or whatever.....but I'm still debugging that. This message is about the misleading error message I got. After adding "WHENEVER ANY ERROR STOP" to the code, I got the following output (even after I reduced it to a minimum amount of code, with no database references and no pointer references). dev/home/dannyw/dsc1/inv/ictl> ./a.out Program stopped at "fu_4gl.4gl", line number 8. FORMS statement error number -1235. Character host variable is too short for the data. dev/home/dannyw/dsc1/inv/ictl> finderr 1235 -1235 Character host variable is too short for the data. In an ESQL/C program, the program has attempted to fetch a column value into a host variable that is not large enough. Use the DESCRIBE command to find out the sizes of column values. If this error arises in a 4GL program, please note all circumstances, and contact the Informix Technical Support Department. Since I naively believed Informix's explanation and wasn't doing any FETCH in my EC module, I presumed the 4GL code had caused the problem. I was all ready to call Informix Tech Support, when I noticed that if I commented out the popquote() function in my EC, the error went away. I didn't particularly care about how my ptr-to-char was popped off the stack (with a null-terminator or not) since I only intended to look at the initial character anyway [if (*f_ptr_to_string == 'T') .... else .....]. Incidentally f_ptr_to_string was declared as char f_ptr_to_string[2]; I decided to review the manual and change the popquote( f_ptr_to_string, 1); to popquote( f_ptr_to_string, 2 ); Wow, it worked....[except I still core dump, which I guess is a separate problem]. I'm tired of bitching about stupid problems with 4GL which Informix doesn't care to correct...they've already expressed their disinterest in maintaining and improving this product, so for what it's worth, don't believe your error messages. The only thing I can imagine is causing my program to core-dump on a retflo() call is that I must be inadvertently assigning something to a pointer which I set incorrectly and am thus wiping out the memory where this function resides. If you can think of another possibility please let me know.....If it matters, this is on HP-UX 10.20 w/ Informix 7.21.UC1 w/ 4GL 6.04.UC3. I also got the same -1235 error on an AIX something or other running Informix 5.something or other.....didn't follow thru to see if the entire program gave me the same core dump...too much trouble to port the database and such, when I think the fault must lie with the C code....even though myself and a couple of others have reviewed most of it and found nothing suspect in it.... Thanks... -- - Danny Wright thgirwnad@moc.toofgib (Yeah, I know you have to strain to read that, but maybe I'll cut down on some spam. Here's a clue, it's bass-ackwards) #include <stddisclaimers.h>