Rocket® Visual COBOL (formerly a Micro Focus® product)

 View Only
  • 1.  JVM - Library Routines

    Posted 03-10-2016 12:04

    Hello,

    in a previous release (2.2) of Visual-Cobol for Eclipse, it was possible to call a "CBL_GET_CURRENT_DIR"-Routine in a JVM-Cobol-program.

    Now in 2.3 I get an error in the same program, when creating an Instance of the JVM-Class in the calling Java-application:
    Exception in thread "main" java.lang.VerifyError: (class: CobConv, method: cobConv signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)B) Illegal local variable number

    I know that the "CBL_CHANGE_DIR"-routine is not supported in JVM-Cobol(and it is documented...). Does anybody know about the "CBL_GET_CURRENT_DIR"-Routine

    thanks in advance
    harald


    #JVMCOBOL


  • 2.  RE: JVM - Library Routines

    Posted 03-10-2016 14:08

    Hi Harald,

    There appears to be a bug in the compiler which is causing this error. I have tracked the cause down to the parameters you are passing to CBL_GET_CURRENT_DIR are part of a group item. If I change these to use 01 levels instead it works correctly.

    01 SRVCHDIR-PARAMS.

              05 SRVCHDIR-FLAGS        PIC X(4) COMP-5.

              05 SRVCHDIR-PFADLAENGE   PIC X(4) COMP-5 VALUE 128.

              05 SRVCHDIR-PFAD-IN      PIC X(128).

              05 SRVCHDIR-PFAD-OUT     PIC X(128).

              05 SRVCHDIR-RESULT       PIC XX COMP-5.

                88 SRVCHDIR-WECHSEL-OK    VALUE 0.

                88 SRVCHDIR-WECHSEL-NOTOK VALUES 128 129.

    change to:

    01 SRVCHDIR-FLAGS        PIC X(4) COMP-5.

    01 SRVCHDIR-PFADLAENGE   PIC X(4) COMP-5 VALUE 128.

    01 SRVCHDIR-PFAD-IN      PIC X(128).

    01 SRVCHDIR-PFAD-OUT     PIC X(128).

    01 SRVCHDIR-RESULT       PIC XX COMP-5.

        88 SRVCHDIR-WECHSEL-OK    VALUE 0.

        88 SRVCHDIR-WECHSEL-NOTOK VALUES 128 129.

    Could you please open up a new support incident with Customer Care and place my name in the description? I will then create a bug report for this problem.

    Thanks.



  • 3.  RE: JVM - Library Routines
    Best Answer

    Posted 03-10-2016 15:12

    You can also try to add the directive NOILNATIVE to the COBOL compile and then it appears to work even with the group item.

    I would still like you to open up a support incident so that we can give you a permanent fix for this,

    Thanks.