Menu

Compiling with Cobjapi

GnuCOBOL
2022-08-11
2022-08-12
  • Rich Di Iulio

    Rich Di Iulio - 2022-08-11

    Hi

    I am working on building an application. All of sudden, I am getting very strange results. I have attached the compile log and the program listing. I have worked on this for several hours and I cannot find anything wrong.
    I need help!

    Rich Di Iulio

     
  • Arnold Trembley

    Arnold Trembley - 2022-08-11

    From the listing, one thing looks like an error to me.

    000016 REPOSITORY.
    000017 COPY "CobjapiFunctions.cpy".

    This copybook ends with:

    000327C FUNCTION J-WINDOWLISTENER.

    And the period/full-stop terminates the REPOSITORY statement.

    But then we have:

    000018 COPY "JAPITASKFN.CPY".

    Which tries to add more functions after the period/full-stop, resulting in the following error:

    000035C
    000036C FUNCTION JT-BEGIN
    warning: PROCEDURE DIVISION header missing - assumed
    error: syntax error, unexpected intrinsic function name
    000037C FUNCTION JT-QUIT.

    So I think the copybooks are not correctly concatenating the list of functions, and then "FUNCTION JT-BEGIN" makes cobc think we should be in the Procedure Division. After that error, it cannot recognize the out-of-order Data Division.

    At least, that's what I would try to fix first...

    Kind regards,

     
    • Rich Di Iulio

      Rich Di Iulio - 2022-08-11

      Arnold,

      That worked. I swapped places for the entries of the repository and removed the period in the JAPITASKFN.CPY copybook.

      Again thanks Arnold. I learned something new today.

      Rich Di Iulio

       
  • Arnold Trembley

    Arnold Trembley - 2022-08-12

    You're welcome!

    Glad I was able to help in some small way.

     

Log in to post a comment.