Previous Topic Next topic Print topic


Procedural COBOL Compared with Managed COBOL

Procedural COBOL is regular COBOL without any of the new syntax that has been added for .NET and JVM. This is the COBOL that will have been used to write Net Express, Server Express and Mainframe Express applications, and it is still actively supported today.

You can compile to native or (in most cases) managed code. The core COBOL syntax is supported in managed code. However, there are some features that are not supported (for example Panels V2, Dialog System and ACUCOBOL-GT). This means that you can take most existing COBOL applications and recompile to create managed applications.

Managed COBOL

Managed COBOL is the collective term for .NET COBOL and JVM COBOL.

Managed COBOL is COBOL with extensions to support the .NET and JVM frameworks. It offers OO syntax support and syntax to allow access to the available class libraries.

When you compile managed COBOL the compiler generates managed code: .il for the .NET framework.

Managed Code and Native Code

You can compile your COBOL program to managed code using the ilgen compiler directive. From within the IDE this happens automatically if you are using a managed COBOL project.

The compiler has now created an intermediate language (.il).

COBOL and all other .NET languages (for example C# and VB) compile to this format, which makes mixed language applications easy to write.

You can also create native code applications. In Visual Studio there are native COBOL project templates.

The compiler generates .exe/.dlls as the result of a native compilation.

The native COBOL application has to call the appropriate management services available for the operating system, whereas a managed application can take advantage of the management services provided by the run time such as exception handling, garbage collection, and thread management.

Run Time

The intermediate language (.il files) can be deployed to a Windows platform running Microsoft's Common Language Runtime (CLR) for execution.

All programs written for the .NET Framework are executed by the Microsoft's Common Language Runtime (CLR) which makes mixed language application programming seamless.

The CLR's just-in-time (JIT) compiler compiles the .il into code native to the operating system. The CLR provides additional services including memory management, exception handling, garbage collection and thread management.

Developing Native and Managed Applications

You use the IDE to develop, compile and debug both native and managed applications. You can write new COBOL code or you can recompile existing COBOL applications to managed or native code, potentially without any code changes.

You can deploy and further debug the application under the run-time system provided by Enterprise Server.

.NET COBOL applications are deployed to Windows platforms running Microsoft's CLR.

Previous Topic Next topic Print topic