7 Replies Latest reply on Apr 16, 2009 4:15 AM by 687700

    Error in buildserver for IBM COBOL - DB2 program with ATMI calls

    687700
      Hi..

      Am using IBM COBOL for AIX version 5.3..
      I have installed Oracle Tuxedo 10g R3 on AIX and IBM DB2 V9.5 on AIX..

      I have written a sample Cobol-DB2 program with ATMI calls for client and server..
      I have precompiled the programs with the command..
      db2 prep COBDBCL.sqb bindfile target ibmcob CALL_RESOLUTION DEFERRED and
      db2 prep COBDBSR.sqb bindfile target ibmcob CALL_RESOLUTION DEFERRED

      and for binding
      db2 bind COBDBCL.bnd and
      db2 bind COBDBSR.bnd

      and for compiling the generated .cbl files i have used this command.
      cob2 -qpgmname\(mixed\) -qlib -I$DB2PATH/include/cobol_a -c COBDBCL.cbl
      cob2 -qpgmname\(mixed\) -qlib -I$DB2PATH/include/cobol_a -c COBDBSR.cbl

      and for building the client and server
      buildclient -C -o COBDBCL -f COBDBCL.cbl and
      buildserver -C -o COBDBSR -s COBDBSR -f COBDBSR.cbl

      Here buildclient is working fine since there is no copy book for "SQLCA" here. but for buildserver am getting this errors..
      PP 5724-H44 IBM COBOL for AIX 2.0.0 in progress ...
      LineID Message code Library phase message text
      280 IGYLI0049-S The "COPY" library was not found. Skipped to the period
      terminating the "COPY" statement.
      Messages Total Informational Warning Error Severe Terminating
      Printed: 1 1
      LineID Message code Message text
      IGYSC0185-I Messages were issued during library phase processing.
      Refer to the beginning of the listing.
      325 IGYPS2121-S "SQLCA" was not defined as a data-name. The statement
      was discarded.
      Same message on line: 332 408 431 501 514
      590 600 618
      Messages Total Informational Warning Error Severe Terminating
      Printed: 10 1 9
      End of compilation 1, program COBDBSR, highest severity: Severe.
      Return code 12
      CMDTUX_CAT:1839: ERROR: can't execute cob2 -c -I/usr/Oracle/Tuxedo10g/cobinclude COBDBSR.cbl

      I have included the library path of DB2 in LIBPATH and path od DB2 in PATH environment variable..

      Am i missing any option while building?? whether the steps which i followed are correct??

      Need ur help..

      Thanks in advance..
        • 1. Re: Error in buildserver for IBM COBOL - DB2 program with ATMI calls
          651249
          I guess you need to specify the library to buildserver with -l options. For example,
          buildserver -C -o COBDBSR -s COBDBSR -f COBDBSR.cbl -l db2.lib.

          Here db2.lib is just an example, you should replace with the real library name.

          Wayne
          • 2. Re: Error in buildserver for IBM COBOL - DB2 program with ATMI calls
            687700
            hi..

            Thanks for ur reply.. I tried what u told but am still getting the same error..

            according to the document given in IBM

            https://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.2pc.doc/doc/t0005113.html

            I have included the RM for DB2 UDB and then i ran this command
            buildtms -r UDB_XA -o ${TUXDIR}/bin/TMS_UDB
            and got this error:
            ld: 0706-006 Cannot find or open library file: -l db2
            ld:open(): A file or directory in the path name does not exist.
            CMDTUX_CAT:1832: ERROR: can't execute cc -brtl -qstaticinline -qrtti=all -I$TUXDIR/include -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB BS-26a01c.c -L${TUXDIR}/lib /usr/Oracle/Tuxedo10g/lib/TMS.o -brtl -qstaticinline -ltux -lbuft -L${DB2DIR}/lib -ldb2 -lfml -lfml32 -lengine -lpthread
            CMDTUX_CAT:530: ERROR: Cannot execute $TUXDIR/bin/buildserver -r UDB_XA -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB -S -s TMS -s..TMS:TMS -f $TUXDIR/lib/TMS.o

            Any idea in this??

            Thank u..
            • 3. Re: Error in buildserver for IBM COBOL - DB2 program with ATMI calls
              687700
              I think i have given the buildtms command in the wrong path.. Now i have given the command in the following path and getting this error..

              /usr/Oracle/Tuxedo10g/udataobj> ${TUXDIR}/bin/buildtms -v -r UDB_XA -o ${TUXDIR}/bin/TMS_UDB
              $TUXDIR/bin/buildserver -r UDB_XA -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB -S -s TMS -s..TMS:TMS -f $TUXDIR/lib/TMS.o -v
              CMDTUX_CAT:4643: ERROR: buildserver cannot open the temporary output file, BS-239024.c.
              CMDTUX_CAT:530: ERROR: Cannot execute $TUXDIR/bin/buildserver -r UDB_XA -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB -S -s TMS -s..TMS:TMS -f $TUXDIR/lib/TMS.o -v

              can anyone help me in this??

              Thanks..
              • 4. Re: Error in buildserver for IBM COBOL - DB2 program with ATMI calls
                Todd Little-Oracle
                Hi,

                buildserver creates a temporary source file of the BS-nnnnn.c which contains generated code to start up the server. I believe this file is written to the current directory. When you executed the buildserver command, was your working directory writable by you?

                Regards,
                Todd Little
                Oracle Tuxedo Chief Architect
                1 person found this helpful
                • 5. Re: Error in buildserver for IBM COBOL - DB2 program with ATMI calls
                  687700
                  Hi Todd,

                  Thanks for ur reply.. I checked that.. the current directory was not writable so changed it by issuing
                  chmod 777 udataobj

                  and now i ran the buildtms command and getting the previous error as:

                  /usr/Oracle/Tuxedo10g/udataobj> ${TUXDIR}/bin/buildtms -v -r UDB_XA -o ${TUXDIR}/bin/TMS_UDB
                  $TUXDIR/bin/buildserver -r UDB_XA -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB -S -s TMS -s..TMS:TMS -f $TUXDIR/lib/TMS.o -v
                  cc -brtl -qstaticinline -qrtti=all -I$TUXDIR/include -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB BS-2230cc.c -L${TUXDIR}/lib /usr/Oracle/Tuxedo10g/lib/TMS.o -brtl -qstaticinline -ltux -lbuft -L${DB2DIR}/include/cobol_a -ldb2 -lfml -lfml32 -lengine -lpthread
                  ld: 0706-006 Cannot find or open library file: -l db2
                  ld:open(): A file or directory in the path name does not exist.
                  CMDTUX_CAT:1832: ERROR: can't execute cc -brtl -qstaticinline -qrtti=all -I$TUXDIR/include -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB BS-2230cc.c -L${TUXDIR}/lib /usr/Oracle/Tuxedo10g/lib/TMS.o -brtl -qstaticinline -ltux -lbuft -L${DB2DIR}/include/cobol_a -ldb2 -lfml -lfml32 -lengine -lpthread
                  CMDTUX_CAT:530: ERROR: Cannot execute $TUXDIR/bin/buildserver -r UDB_XA -o /usr/Oracle/Tuxedo10g/bin/TMS_UDB -S -s TMS -s..TMS:TMS -f $TUXDIR/lib/TMS.o -v

                  I have included this in the Resource Manager
                  # DB2 UDB
                  UDB_XA:db2xa_switch_std:-L${DB2DIR}/include/cobol_a -ldb2

                  could u help me in this??

                  Edited by: user8103349 on Apr 10, 2009 1:09 AM
                  • 6. Re: Error in buildserver for IBM COBOL - DB2 program with ATMI calls
                    Todd Little-Oracle
                    Hi,

                    Well the error indicates that the linker can't find the library db2. Are you sure DB2DIR is set correctly and that the db2 library is located in $(DB2DIR)/include/cobol_a ? That seems like a strange place for the DB2 XA libraries.

                    Regards,
                    Todd Little
                    Oracle Tuxedo Chief Architect
                    • 7. Re: Error in buildserver for IBM COBOL - DB2 program with ATMI calls
                      687700
                      Hi Todd,

                      Thanks for ur reply.. I have given the wrong path for DB2 library.. Now i have corrected it and buildtms is working fine..

                      ${DB2DIR}/lib is the correct one and DB2DIR is the path of the sqllib under the DB2 instance..