Re: Creating a BDS Informix runner for OnLine 5.20 under AIX 5.2 with gcc

Sebastien FLAESCH <[email protected]> Wed, 13 Sep 2006 15:25:22 +0200
Newsgroups gmane.comp.lang.4gl.fourjs.user
Organization Four J's Development Tools
Message-ID <[email protected]>
I would recommend you to use the ix914 driver instead of ifx9xx, the first
one is 100% compatible to Informix 4gl (to support CREATE DATABASE for ex),
while the second had some limitation (it was designed to have an Informix
driver in the ODI architecture - for example to connect to Informix and
Oracle at the same time).

With next Genero FGL version this ix / ifx  difference is gone. We have now
a unique, compatible driver.

Seb

McGrath, Colin wrote:
> The fine folks at Four-Js helped me through a problem, and I thought I'd
> pass the solution along in case any one else happens to have the same
> configuration:
> 
> We are running Online 5.20, and have CDKS Version 2.90 (and 4GL 7.32) on
> a machine running AIX 5.2.
> We have the gcc compiler.
> 
> To create a BDS Informix runner (with the fglmkrun script), I had
> originally used the following command:
> 
> 
>>>fglmkrun -o ifxrunner -d ix501 -l esql -v
>>>
>>>4GL Virtual Machine Builder
>>>
>>>Selecting standard C extension interface...
>>> /fgl2c/f4gl_3.54/lib/fglExt.o
>>>
>>>Runner creation parameters :
>>> Output file               : ifxrunner
>>> Database interface        : ix501
>>> Language support library  : /fgl2c/f4gl_3.54/lib/libascii.a
>>> C extension file          : /fgl2c/f4gl_3.54/lib/fglExt.o
>>>
>>>Linking Informix 5.01 runner...
>>>
>>>esql -o ifxrunner /fgl2c/f4gl_3.54/lib/fglExt.o 
>>>/fgl2c/f4gl_3.54/lib/fglrun.o /fgl2c/f4gl_3.54/lib/libfglr.a 
>>>/fgl2c/f4gl_3.54/lib/libf2c.a /fgl2c/f4gl_3.54/lib/libix501.a 
>>>/fgl2c/f4gl_3.54/lib/libf2c.a /fgl2c/f4gl_3.54/lib/libascii.a  -lm 
>>>-ldl
>>>-lsupc++ /fgl2c/f4gl_3.54/lib/libgcc.a
>>>
>>>
>>>Runner successfully created.
> 
> 
> But when I ran a 4GL program using that runner, cursors fetching data
> from our Informix database didn't grab the data, and the sqlca.sqlcode
> value returned from the fetch was a large negative value, (not 0 nor
> 100).
> 
> But when the informix runner was created with "-d ifx9xx" instead of
> with "-d ix501", the proper sqlca.sqlcodes are now returned when we
> fetch/add/update, etc.
> 
> The explaination I got from Four-Js tech support was:
> 
> 
>>Since you are linking with -l esql which will be coming from your CSDK
> 
> that
> 
>>is why I suggested you use ifx9 according to your version.  
>>Once you are linking with the right driver then your lower level ODI
>>will be taking care of the database interface which in your case is
> 
> online
> 
>>5.20.  
> 
> 
> 
> Because we are using the gcc compiler instead of the AIX xlc c-code
> compiler, I also had to make some other changes:
> 
> In the 4JS "envcomp" script:
> 
> export CC="gcc -maix64"
> export FGLCC="$CC"
> export INFORMIXC="$CC"
> export FGLLIBSYS="-lm -ldl -lsupc++"
> export OBJECT_MODE=64
> 
> 
> In the Informix "esql" script:
> 
> From:
> < CC="${INFORMIXC=cc} -qchars=signed -q64  -qlanglvl=ansi
> -qalign=natural -qcheck=nullptr -qmaxmem=-1 -qspill=2000 -D_H_LOCALEDEF"
> To:
> 
>>CC="${INFORMIXC=cc} -fwritable-strings -D_H_LOCALEDEF -DAIX5L
> 
> -Wl,-b64"
> 
> <         STATICFLAGS="$STATICFLAGS -brtl"
> ---
> 
>>        STATICFLAGS="$STATICFLAGS -Wl,-brtl"
> 
> 
> <               exec $CC -I$INFDIR/incl/esql $INCLUDE -brtl $A $BO
> $LIBPATHS $SLIB $ALIB $GLIB $OLIB $GLSLIB $SYSNLIB $SYSLIB $ESQLDB2
> $CHKAPI $GLXLIB $THRLIB
> ---
> 
>>              exec $CC -I$INFDIR/incl/esql $INCLUDE -Wl,-brtl $A $BO
> 
> $LIBPATHS $SLIB $ALIB $GLIB $OLIB $GLSLIB $SYSNLIB $SYSLIB $ESQLDB2
> $CHKAPI $GLXLIB $THRLIB
> 
> 
> I was also able to create a BDS runner with C code extensions, by first
> compiling the .c files with esql, then running:
> 
> fglmkrun -d ifx9xx -l esql -o fglgui -ext myExt.c -aob "usr_funcs.o
> blob2blob.o blob2char.o char2blob.o"
> 
> --
> Colin
>