Re: ESQL/C
Posted in 1994
In article <3698v8$ro3@net.usuhs.mil> viktor@mgr.hjf.org (Viktor Kaufmann) writes:
>This is a follow-up to my question from yesterday about migrating from
>esql/c programs from Informix 4.0 to 5.0. Basically, I have narrowed
>the problem down to the DECLARE statement in the .ec file.
>
>A program with the statement
>
>$DECLARE q_curs CURSOR FOR
> SELECT col1, col2, col3 FROM tablename
> INTO $colvar1, $colvar2, $colvar3
> WHERE col1 = $var1>
>will not compile the DECLARE command, giving the error message:
>
>warning: improper pointer/integer combination: op "="
>syntax error before or at: _FSO
>cannot recover from previous errors.
>undefined symbol: _FSO
>
>If the WHERE clause is commented out, the error does not go away. If
>the DECLARE part is eliminated, leaving only the SELECT (and commenting
>out the OPEN and FETCH associated with the DECLARE), the program
>compiles correctly. In examining the .c file created by cperf, I find
>the construct _FSO, which does *not* appear in my .ec file. I have
>tried including every header file esql/c may use (excluding the X/OPEN
>header), but this has not helped.
Sorry about the incorrect syntax for the DECLARE in the above quote. It
should read:
$DECLARE q_curs CURSOR FOR
SELECT col1, col2, col3
INTO $colvar1, $colvar2, $colvar3
FROM tablename
WHERE col1 = $var1;
Please notice, I did say that the select itself compiled correctly when
the DECLARE section was commented out. Another important thing to
mention is that all the source code we are now having problems with
compiles correctly under version 4.0 on our DEC/Ultrix VAX. It is only
on our Sun, with the new versions of Informix, that we are having
problems.
Just in case it matters, we are installing, in the following order,
these products:
I-SQL 4.11.UC1
I-4GL 4.11.UC3
ESQL/C 5.02.UC6
Informix-SE 5.02.UC7
Thanks for your help,
Viktor Kaufmann
viktor@mgr.hjf.org