Highlighted
Absent Member.
Absent Member.
1332 views

Debug a JVM Cobol application

Hi,

I have some trouble when i try to "debug" an application in Visual COBOL. 

I looked in the documentation but I havn't found a solution. When I run my application, I give it a buffer of several thousand character, i run it on java like this :

Reference ref = new Reference();

ref.bytes = "000A003 [....] 030303030".getBytes();

MyProgram program = new MyProgram();

program.MyProgram(ref);

But now, i want to debug my Cobol using Visual Cobol, but i don't know how to pass this buffer to my program.

How can i do it ?

Thanks,

Regards

0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: Debug a JVM Cobol application

Hi,

One way would be to debug your java class and step into the COBOL program. You can either step or put a breakpoint in the COBOL program.

Regards,

George

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Debug a JVM Cobol application

The Reference class is not documented because it is an internal runtime class and using it would

not give your person reusing the COBOL program a nice interface

The recommend approach is to use a class that sits in front of the COBOL program that helps expose a

better interface to Java with better types that a opaque "by reference" parameter.

I would recommend you have a read of the following sections..

Tutorial - Creating a JSP web application

documentation.microfocus.com/.../index.jsp

Or jump to the bit that wrappers a COBOL program as a class..

 documentation.microfocus.com/.../GUID-B2CD9117-26FD-44CA-93DC-2AB9789EFD98.html

Also.. this section might help you too...

Exposing COBOL Linkage Data as Managed Types

documentation.microfocus.com/.../index.jsp

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.