Previous Topic Next topic Print topic


Native COBOL compared with managed COBOL

Native COBOL and managed COBOL differ in how they compile and how the run-time management services, such as security, threading and memory management are provided.

Managed COBOL on the .NET platform compiles to Microsoft Intermediate Language (IL), and native COBOL compiles to machine code. Both managed and native COBOL can run on any Windows platform when compiled.

For .NET code, the management services are provided by the Microsoft Common Language Runtime (CLR). For native COBOL, the management services are available in the operating system, and your code has to call the appropriate services depending on the operating system. The management services enable seamless interoperation of COBOL programs with programs in other managed languages.

What Is .NET managed code?

.NET managed code compiles to Microsoft Intermediate Language (IL). The IL is stored in an assembly, along with meta data that describes the classes, methods, and attributes (such as security requirements) of the code you've created.

.NET managed code runs in the Microsoft Common Language Runtime (CLR). The CLR does Just In Time (JIT) compilation. That is, when you load an assembly, the CLR JITs the assembly code the first time it is executed. There is a small performance penalty as an application loads, but because the CLR compiles your code, it doesn't do it again (until next time you restart it).

The CLR is responsible for managing your application code at run time, and provides security, memory management and so on.

Building native and managed COBOL applications

In the IDE you can develop, compile and debug your applications, for both native and managed code.

You can write new COBOL code or you can recompile existing COBOL as managed or native code, potentially without any code changes.

You can deploy and further debug the application under the run-time system provided by COBOL Server. .NET COBOL applications are deployed to Windows platforms running the .NET Framework.

Previous Topic Next topic Print topic