utils2_ak
Posted in 2025
Clive Eisen got ESQL/C error -33051 building dbmove from Art Kagel's utils2_ak on CSDK 3.70 (11.70.FC4). Scot Jenkins reproduced it on 12.10 and patched the SELECT DBINFO line with FROM sysdual. Clive used systables where tabid = 1. Art explained constant queries without FROM need CSDK 4.50, and updated the package. Art and Dennis Melnikov noted sysdual lives in sysmaster.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL
11.70 FC4
gcc version 4.8.5 20150623
I think I must be doing something stupid
Downloaded latest utils2
make
The only error is
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbmove dbmove.ec getopt.cesqlc: "dbmove.ec", line 419: Error -33051: Syntax error on identifier or symbol ';'.
1 error(s) found
make: *** [dbmove] Error 1
where line 419 is
EXEC SQL SELECT DBINFO( 'version', 'major' ) INTO :major_vers;
if (sqlca.sqlcode < 0) {
Is it because the version is so old
—
Clive Eisen
Clive: Huh. I actually just did a test build yesterday and all went well. I also just tried compiling dbmove using the command line you posted and that worked fine as well. Your versions of gcc and the engine don't look so old that it might cause an issue. OK, let's get the "dumb stuff" out of the way first. Post or email me the output from following: ident dbmove.ec esql -V If you don't have ident try this instead: egrep 'Revision:|Header:|Date:' dbmove.ec Also, I'm assuming you are on Linux. If that's not the case, let me know your platform. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
Hi Art, [informix@ansible utils2_ak]$ esql -V IBM Informix CSDK Version 3.70, IBM Informix-ESQL Version 3.70.FC4 Software Serial Number AAA#B000000 [informix@ansible utils2_ak]$ ident dbmove.ec dbmove.ec: $Header: /home/art/GoogleDrive/Latest\\040Art's\\040Stuff/RCS/dbmove.ec,v 1.17 2025/02/18 12:12:12 art Exp $ $Log: dbmove.ec,v $ $Header: /home/art/GoogleDrive/Latest\\040Art's\\040Stuff/RCS/dbmove.ec,v 1.17 2025/02/18 12:12:12 art Exp $ $RCSfile: dbmove.ec,v $ $Revision: 1.17 $ $Date: 2025/02/18 12:12:12 $ $Revision: 1.17 $ yes linux - centos 7 Regards, — Clive Eisen
Clive: OK, so latest utils2_ak package, appropriate ESQL/C compiler. Can you email me the generated dbmove.c file? Maybe I'll see something there. I assume everything else in the package built OK? Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
| view attached Hi Art, Here you go
Art,
I can confirm the build failure on Informix 12.10.FC16W2DE with CSDK
installed, just upgraded yesterday.
OS is Slackware 14.1 x86_64 with many upgrades, including gcc 4.9.4.
This system also uses glibc 2.17 so same as RHEL/CentOS 7.
informix$ esql -V
IBM Informix CSDK Version 4.10, IBM Informix-ESQL Version 4.10.FC16W2
Software Serial Number AAA#B000000
Downloaded the latest Utils2_AK package from:
https://www.askdbmgt.com/uploads/4/6/2/4/46246531/utils2_ak.zip
Unzip, cd into directory.
informix$ ident dbmove.ec
dbmove.ec:
$Header: /home/art/GoogleDrive/Latest\\040Art's\\040Stuff/RCS/dbmove.ec,v 1.17 2025/02/18 12:12:12 art Exp $
$Log: dbmove.ec,v $
$Header: /home/art/GoogleDrive/Latest\\040Art's\\040Stuff/RCS/dbmove.ec,v 1.17 2025/02/18 12:12:12 art Exp $
$RCSfile: dbmove.ec,v $
$Revision: 1.17 $
$Date: 2025/02/18 12:12:12 $
$Revision: 1.17 $
informix$ make
...lots of stuff built OK, then dies with same error Clive got...
make[1]: Leaving directory `/data/tmp/ART2/myschema.d'
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbscript dbscript.ec getopt.c
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbsavail dbsavail.ec getopt.c
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbmove dbmove.ec getopt.cesqlc: "dbmove.ec", line 419: Error -33051: Syntax error on identifier or symbol ';'.
1 error(s) found
make: *** [dbmove] Error 1
I have no dbmove.c, just dbmove.ec.
My version of dbmove.ec compares identical to the one Clive posted.
I am able to compile other esql/c simple demo programs on Informix
12.10 and they work OK.
---
On Informix 14.10.FC11W1DE with CSDK,
also on Slackware 14.1 x86_64 with many upgrades, including gcc 4.9.4:
$ esql -VIBM Informix CSDK Version 4.50, IBM Informix-ESQL Version 4.50.FC11W1
dbmove builds OK, and dbmove.c is created.
The build ends with:
make[1]: Leaving directory `/data/tmp/ART/myschema.d'
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbscript dbscript.ec getopt.c
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbsavail dbsavail.ec getopt.c
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbmove dbmove.ec getopt.c
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbping dbping.ecrm bload 2>/dev/null
make: [bload] Error 1 (ignored)
ln ul bload
touch -h bload
rm bunload 2>/dev/null
make: [bunload] Error 1 (ignored)
ln ul bunload
touch -h bunload
but otherwise seems to have built OK.
Something to do with the CSDK version?
Art,
After some experimentation I was able to get dbmove to build on Informix
12.10 with the following patch:
....................cut here....................
--- dbmove.ec.orig 2025-02-18 07:12:25.000000000 -0500
+++ dbmove.ec 2025-05-16 02:10:35.449279393 -0400
@@ -416,7 +416,7 @@
commit_ok = (sqlca.sqlwarn.sqlwarn1 == 'W');
begin_ok = (commit_ok && sqlca.sqlwarn.sqlwarn2 != 'W');
- EXEC SQL SELECT DBINFO( 'version', 'major' ) INTO :major_vers;
+ EXEC SQL SELECT DBINFO( 'version', 'major' ) INTO :major_vers FROM sysdual;
if (sqlca.sqlcode < 0) {
fprintf( stdout,
"Error determining source server version: %d, %d\\n",
....................cut here....................
I'm not sure if sysdual is correct for your application but, when running
the SQL manually in dbaccess I had to specify a FROM clause to get it to work.
scot
Scott - brilliant I had to make it from systables where tabid = 1 as 11.70 has no sysdual. Regards, — Clive Eisen
Scot, Clive: YES! Constant queries with no FROM clause is first supported in CSDK 4.50!!!! OK, I will apply that patch and post an update! I'll post here once it's online. Thanks for figuring this out for me!!! Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
OK, the utils2_ak on my site has been updated with the patched dbmove.ec. Let me know of there are any remaining issues. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
Clive, Not every database. Sysmaster has. ------------------------------ Sincerely, Dennis ------------------------------
Clive:
The sysmaster:sysdual table first appeared in v11.10.xC1, so it is indeed included in 11.50 and 11.70. There is no sysdual in every database, but you can certainly create a public synonym local to each database, either named "dual" or "sysdual" or even both pointing back to sysmaster:sysdual:
> create synonym dual for sysmaster:sysdual;Synonym created.
> select 12 from dual;(constant)
12
1 row(s) retrieved.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Related threads
- Re: Informix compile error
- calling stored procedure of two database?
- Re: calling stored procedure of two database?
- Re: calling stored procedure of two database?