Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
Expand all | Collapse all

utils2_ak

  • 1.  utils2_ak

    Posted Thu May 15, 2025 05:33 AM
    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.c
    esqlc: "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


  • 2.  RE: utils2_ak

    Posted Thu May 15, 2025 06:27 AM

    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
    ------------------------------



  • 3.  RE: utils2_ak

    Posted Thu May 15, 2025 10:55 AM
    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




  • 4.  RE: utils2_ak

    Posted Thu May 15, 2025 11:01 AM

    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
    ------------------------------



  • 5.  RE: utils2_ak

    Posted Thu May 15, 2025 11:06 AM
      |   view attached
    Hi Art,

    Here you go


    Attachment(s)

    zip
    dbmove.ec.zip   10 KB 1 version


  • 6.  RE: utils2_ak

    Posted Fri May 16, 2025 01:28 AM

    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.c
    esqlc: "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 -V
    IBM 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.ec
    rm 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?




  • 7.  RE: utils2_ak

    Posted Fri May 16, 2025 02:20 AM

    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




  • 8.  RE: utils2_ak

    Posted Fri May 16, 2025 03:28 AM
    Scott - brilliant

    I had to make it

    from systables where tabid = 1

    as 11.70 has no sysdual.

    Regards,


    Clive Eisen




  • 9.  RE: utils2_ak

    Posted 30 days ago

    Clive,

    Not every database. Sysmaster has.



    ------------------------------
    Sincerely,
    Dennis
    ------------------------------



  • 10.  RE: utils2_ak

    Posted 30 days ago

    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
    ------------------------------



  • 11.  RE: utils2_ak

    Posted Fri May 16, 2025 06:45 AM

    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
    ------------------------------



  • 12.  RE: utils2_ak

    Posted Fri May 16, 2025 06:59 AM

    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
    ------------------------------