Highlighted
harald_schmidt Absent Member.
Absent Member.
1118 views

JVM - Library Routines

Jump to solution

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

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

RE: JVM - Library Routines

Jump to solution

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.

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

RE: JVM - Library Routines

Jump to solution

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.

0 Likes
Micro Focus Expert
Micro Focus Expert

RE: JVM - Library Routines

Jump to solution

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.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.