Highlighted
Absent Member.
Absent Member.
516 views

RunUnit or RuntimeSystem

Jump to solution

Hello,

i am trying to call my cobol program.

Using RunUnit, it works:
RunUnit runUnit = new RunUnit();
runUnit.Call("MyProgramm");

Using RuntimeSystem, it doesn't work ("programm not found"):
RuntimeSystem.cobcall("MyProgramm", pl);

Whats the differnce between RunUnit and RuntimeSystem ?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: RunUnit or RuntimeSystem

Jump to solution
The RuntimeSystem class provides the cobcall and other methods that allow you to call native COBOL programs from Java.
You would use RuntimeSystem when calling native COBOL (.int, .gnt or .dll) from Java in a J2SE environment.

The RunUnit class is for use with managed code (.NET or JVM) and is used to isolate threads from one another so that program resources such as working-storage data and database connections, etc are kept separate.

You would use RunUnit when calling managed COBOL from COBOL or other languages such as Java or C# and you are running within a pooled threading environment such as in a web application like Tomcat or ASP.NET.

View solution in original post

2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: RunUnit or RuntimeSystem

Jump to solution
The RuntimeSystem class provides the cobcall and other methods that allow you to call native COBOL programs from Java.
You would use RuntimeSystem when calling native COBOL (.int, .gnt or .dll) from Java in a J2SE environment.

The RunUnit class is for use with managed code (.NET or JVM) and is used to isolate threads from one another so that program resources such as working-storage data and database connections, etc are kept separate.

You would use RunUnit when calling managed COBOL from COBOL or other languages such as Java or C# and you are running within a pooled threading environment such as in a web application like Tomcat or ASP.NET.

View solution in original post

Highlighted
Absent Member.
Absent Member.

RE: RunUnit or RuntimeSystem

Jump to solution
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.