RunUnit or RuntimeSystem

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 ?

  • Verified Answer

    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.