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. This means that native COBOL has to be compiled for the operating system on which it is going to run, whereas compiled managed COBOL can run on any Windows platform.

For .NET managed 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 are:

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. This assembly is relatively easy to deploy and often involves only copying the assembly to the server where your run-time system is.

.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

You use the IDE to 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 Server Enterprise Edition. .NET COBOL applications are deployed to Windows platforms running the .NET Framework.

Previous Topic Next topic Print topic