missing cobdb264 library

I copied MF sample DB2 SQL project: Connect project from Windows to RedHat,  try to recompile it under Linux.

I got this error:

[cobollink] cob64 -g -x -t -oConnect Connect.o /opt/ibm/db2/V11.1/lib64/libdb2.so
[cobollink] Connect.o: In function `CONNECT_MFSQLECM-INIT':
[cobollink] /home/cobol/sql/db2ecm/Connect/Connect.cbl:129: undefined reference to `cobdb264'
[cobollink] collect2: error: ld returned 1 exit status
[cobollink] Link complete with errors

Could someone tell me which library should I link to find cobdb264?

Thanks in advance,

-Jack

Tags:

Parents
  • Hi

    One way to find the file is by setting LD_DEBUG and run a DB2 cobol program.

    docs.oracle.com/.../index.html

    >>>>>>> I have used a simple test program PMETEST

    /home/tonyt/test/2695871db2comp3 >export LD_DEBUG=libs

    /home/tonyt/test/2695871db2comp3 >export LD_DEBUG_OUTPUT=lddebug.log

    /home/tonyt/test/2695871db2comp3 >./PMETEST

    main Started >>>>

    init Started >>>>

    DB2INSTANCE <db2inst1                                                                                            >

    connected to db :

    work Started >>>>

    sqlcode < 0000000000> BCD1 is < 00000000000000000> BCD2 is < 000000013457275552> BCD3 is < 00000000219907074>

    test we can access db hv-date <12/05/1993> h7 < 000000000831>

    fini Started >>>>

    main press any key to return

    /home/tonyt/test/2695871db2comp3 >unset LD_DEBUG

    /home/tonyt/test/2695871db2comp3 >ls -ltr | tail -n1

    -rw-r--r-- 1 tonyt support 32875 Jul 21 10:51 lddebug.log.9699

    /home/tonyt/test/2695871db2comp3 >grep "cobdb2" lddebug.log.9699 | grep calling

         9699:     calling init: /home/products/vcdevhub22/lib/cobdb264.so

         9699:     calling fini: /home/products/vcdevhub22/lib/cobdb264.so [0]

    /home/tonyt/test/2695871db2comp3 >

    >>>>>>>

    So this is the file that is loaded at runtime.

    /home/products/vcdevhub22/lib/cobdb264.so

    You need the –d to allow the compile to complete, the cobol runtime will load this file.

    The file is likely a CSO callable shared library

    documentation.microfocus.com/.../BKCYCYFLAGS001F033.html

    Tony

Reply
  • Hi

    One way to find the file is by setting LD_DEBUG and run a DB2 cobol program.

    docs.oracle.com/.../index.html

    >>>>>>> I have used a simple test program PMETEST

    /home/tonyt/test/2695871db2comp3 >export LD_DEBUG=libs

    /home/tonyt/test/2695871db2comp3 >export LD_DEBUG_OUTPUT=lddebug.log

    /home/tonyt/test/2695871db2comp3 >./PMETEST

    main Started >>>>

    init Started >>>>

    DB2INSTANCE <db2inst1                                                                                            >

    connected to db :

    work Started >>>>

    sqlcode < 0000000000> BCD1 is < 00000000000000000> BCD2 is < 000000013457275552> BCD3 is < 00000000219907074>

    test we can access db hv-date <12/05/1993> h7 < 000000000831>

    fini Started >>>>

    main press any key to return

    /home/tonyt/test/2695871db2comp3 >unset LD_DEBUG

    /home/tonyt/test/2695871db2comp3 >ls -ltr | tail -n1

    -rw-r--r-- 1 tonyt support 32875 Jul 21 10:51 lddebug.log.9699

    /home/tonyt/test/2695871db2comp3 >grep "cobdb2" lddebug.log.9699 | grep calling

         9699:     calling init: /home/products/vcdevhub22/lib/cobdb264.so

         9699:     calling fini: /home/products/vcdevhub22/lib/cobdb264.so [0]

    /home/tonyt/test/2695871db2comp3 >

    >>>>>>>

    So this is the file that is loaded at runtime.

    /home/products/vcdevhub22/lib/cobdb264.so

    You need the –d to allow the compile to complete, the cobol runtime will load this file.

    The file is likely a CSO callable shared library

    documentation.microfocus.com/.../BKCYCYFLAGS001F033.html

    Tony

Children
No Data