Procedural COBOL Compared with .NET COBOL

Note: Visual COBOL for Visual Studio 2019 supports .NET COBOL. To develop applications for JVM COBOL, install our Visual COBOL for Eclipse product.

Procedural COBOL is regular COBOL without any of the new syntax that has been added for .NET and JVM. This is the COBOL that was 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) .NET COBOL. The core COBOL syntax is supported in .NET COBOL. 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 .NET COBOL applications.

.NET COBOL

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

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

.NET COBOL and Native COBOL

You can compile your COBOL program to .NET COBOL code using the ilgen compiler directive. From within the IDE this happens automatically if you are using a .NET 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 .NET COBOL Applications

You use the IDE to develop, compile and debug both native and .NET COBOL applications. You can write new COBOL code or you can recompile existing COBOL applications to native or .NET COBOL 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 Microsoft's CLR.