Educator Hub User Group

  • 1.  I have a problem to compile and execute DB2 cobol program

    Posted Wed September 27, 2023 01:18 AM
    Edited by Paul Newton Wed September 27, 2023 02:48 PM

    I'm compiling a Cobol db2 program and it's not generating the plan
    When I run it I get the message -924



    ------------------------------
    Edgard Amoroso
    ------------------------------



  • 2.  RE: I have a problem to compile and execute DB2 cobol program

    Posted Wed September 27, 2023 02:33 PM

    Edgard,  thanks for the details. I am reviewing now and will get back to you today. Paul



    ------------------------------
    Paul Newton
    Consulting IT Specialist
    IBM
    Coppell TX
    ------------------------------



  • 3.  RE: I have a problem to compile and execute DB2 cobol program

    Posted Wed September 27, 2023 02:36 PM

    Edgard, 3 issues:

    1) I reviewed all attached documents.  The -924 is not present in any of the attached documents.  Can you run the job that produces that -924 and provide a screen shot of the specific -924 SQLCODE error and related messages?

    2) I reviewed your source code and observed attempt to EXEC SQL INSERT INTO BRASILIA.TESTE which can result in a -924.

    Why?

    Db2 for zOS tables are qualified by owner/schema ... not by database name
    Database BRASILIA can have many tables with different owners or schemas.
    TESTE is currently owned by KC02460.
    Source code needs to be 
    EXEC SQL
           INSERT INTO KC02460.TESTE
    3) BIND .... I do not see any Db2 PLAN for the compiled program
    If the BIND failed (with permission or something else), I need a screen shot of the BIND failure with the accompanying messages.
    I would be happy to help resolve the issues.  I need the SQLCODEs with accompanying error messages to provide more assistance.
    Paul


    ------------------------------
    Paul Newton
    Consulting IT Specialist
    IBM
    Coppell TX
    ------------------------------