Re: Threadlib and Informix error -931
Posted in 2005
Dear Gagan,
gagan.haloi@gmail.com wrote:
> I am getting Informix error -931 and ISAM error -8 while using thread
> lib in my program on HP11i server
>
> Find below a sample program
> $>cat 1.ec
> ==========
> $include sqlca;
> void main()
<soapbox mode=on>
int main(void)
What you've written is non-standard C - don't go posting such code
anywhere near comp.lang.c.std; they'll really bite your head off. It's
also good practice in both C and C++ to include an explicit return(0);
(or return 0;) at the end of main to indicate the status you want to
return to the o/s. Even in test code. Even in C++ - where the standard
wimped out and says that if you run off the end of 'int main(void)' or
its variant declarations, then 0 is returned.
</soapbox>
> {
> EXEC SQL DATABASE cdu_bookings;
> printf("SQL: %d, ISAM: %d\\n", sqlca.sqlcode, sqlca.sqlerrd[1] );
>
> }
>
> Compile the program with and without the thread libraries
> $>export THREADLIB=posix
> $>esql -thread 1.ec -o 1_with_thread
> $>esql 1.ec -o 1_no_thread
>
> If I run program "1_with_thread" it gives me SQL err -931 and ISAM
> error -8.
>
> $>1_no_thread
> SQL: 0, ISAM: 0
>
> $>1_with_thread
> SQL: -931, ISAM: 8
Eeurgggghhhh! If one can connect, it is far from obvious why the other
cannot. It'd be one thing if it was complaining about missing
libraries; it is quite another for this to fail like that.
Time to brush off your support contract - contact IBM Tech Support. The
configuration files are, a priori, OK because the non-threaded build can
connect using them.
> I have checked the /etc/services and sqlhost file. They are OK.
>
> Find below the comfiguration
>
> $>env|grep INF
> INFORMIXDIR=/usr/informix_7.31UC
> INFORMIXSERVER=dev25_srv>
> $>grep dev25_srv $INFORMIXDIR/sqlhosts
> dev25_srv onsoctcp sterling.apis.dhl.com dev25_srv.exec
> g=dev25_pri_grp>
> $>grep "dev25_srv.exec" /etc/services
> dev25_srv.exec 7104/tcp
>
> $>grep NETTYPE $INFORMIXDIR/etc/onconfig.dev25
> NETTYPE soctcp,2,350,NET # Configure poll thread(s) for nettype>
> $>grep -h Ver $INFORMIXDIR/etc/*-cr
> INFORMIX LIBASF LIBRARY Version 9.30.HC1
> INFORMIX ODBC LIBRARY Version 3.31.0000.HC1
> INFORMIX-Client SDK Version 2.40.HC1
This is not in its first flush of youth. You're likely to be asked to
upgrade to 2.70 or beyond. I see you're using HC1, which is a HP-UX
10.20 32-bit compatible with 64-bit version of CSDK (somehow; IIRC, it
permits 32-bit programs to connect to 64-bit servers via shared memory).
You're also using IDS 7.31.UD6, which is a 32-bit IDS; I would expect
to be using CSDK 2.40.UC1. However, since you're using onsoctcp
connections, there shouldn't be any issue. (The significance of 2.70
etc is that I'm not sure that we still have both HC1 and UC1 versions of
CSDK - the current release level is CSDK 2.90, containing ESQL/C 2.90
[yes, a retrograde step in the ESQL/C version numbers!].)
> INFORMIX LIBDMI LIBRARY Version 2.20.HC1
> INFORMIX EMBEDDED SQL for C Version 9.30.HC1
> INFORMIX LIBGEN LIBRARY Version 9.30.HC1
> INFORMIX LIBGLS LIBRARY Version 3.10.HC1
> INFORMIX-4GL Interactive Debugger Version 7.30.HC4
> INFORMIX-4GL Version 7.30.HC4P1
> INFORMIX-4GL Rapid Development System Version 7.30.HC4P1
> Informix Dynamic Server Version 7.31.UD6W4
> INFORMIX-SQL Version 7.30.HC4P1
> INFORMIX LIBOS LIBRARY Version 9.30.HC1
> INFORMIX LIBSQL LIBRARY Version 9.30.HC1
>
> $>swlist -l product|grep lib
> Curses-Color B.11.11 Curses library with color support
> Judy-lib B.11.11.04.13 Judy Library and Related files
> PHCO_23370 1.0 lint(1) library patch
> PHCO_25569 1.0 libc cumulative header file patch
> PHCO_27037 1.0 libpam_unix cumulative patch
> PHCO_28481 1.0 cumulative 10.20 libc
> compatibility support
> PHCO_28605 1.0 libnss_files cumulative patch
> PHCO_29028 1.0 libsec cumulative patch
> PHCO_29328 1.0 libc manpage cumulative patch
> PHCO_29955 1.0 libc cumulative patch
> PHKL_26074 1.0 libaudit.a cumulative patch
> PHKL_28765 1.0 VM panic with shared libs and
> large pages
> PHNE_23574 1.0 libnss_dns DNS backend patch
> PHSS_24207 1.0 libm patch
> PHSS_27367 1.0 Shared libF90 B.11.01.12
> PHSS_27700 1.0 CPSlib Cumulative Patch (OMP V2.0
> for 11.11)
> PHSS_28880 1.0 HP aC++ -AA runtime libraries (aCC
> A.03.50)
> libiconv 1.9.2 libiconv
>
> Please help me finding out the problem.
>
> Thanks
> -Gagan
>
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.01 -- http://dbi.perl.org/