.Net, Managed, or Native

Is it worth learning native cobol or should i jump right into .net or managed?  Thoughts?

  • It depends on your situation. I have many native COBOL programs I maintain that were written over several decades. These I am keeping in native COBOL because I can simply recompile the NetExpress code using the Visual COBOL compiler and they run. However, all new programs I write will be in managed COBOL because they can take full advantage of the Windows environment within which I work. I have one managed COBOL program that serves as a menu to run native COBOL programs. They can coexist. If you are just learning COBOL, I don't see any advantage to learning native. It is, from my limited perspective, a subset of managed COBOL.
  • Thanks for your opinion. I learned Cobol in 1985 when I was in college. I am now a .net, C#, VB, Typescript, Angular programmer. I wanted to relearn Cobol to add to my existing knowledge. I was unsure whether to pursue it from the native standpoint or .net/managed.
  • The terms native and managed in Micro Focus terminology actually refer to the code generated by the compiler and really has little to do with the syntax of the programs you are writing.

    Native code projects in Visual COBOL will generate .obj code for a particular platform that can then be linked into executables such as .exe or .dlls on Windows or Unix/Linux executables or shared objects (.so).

    Managed code projects in Visual COBOL will generate either .NET assemblies which also have the extension .exe or .dll if you are using the Visual Studio flavor (use ilgen directive) or as Java byte code which have the extension .class if you are using the Eclipse flavor (use jvmgen directive).

    Both types of projects are capable of compiling legacy procedural COBOL programs.
    Managed code projects also support the new Object-Oriented syntax allowing you to create classes and methods that integrate tightly with either .NET or Java.
    Native code projects also support Object-Oriented syntax but this is an older variety used to create native classes that integrate with a proprietary class library written in Micro Focus COBOL.

    If you are familiar with C# then OO-COBOL will be very familiar to you. You can freely mix procedural programs and OO features within a single program or class. You can CALL a procedural program from within a class or you can INVOKE a method from within a procedural program. You can also call C# from COBOL and COBOL from C# and debug seamlessly from one into another.

    If you wish to hook your COBOL programs up to a GUI such as Windows Forms or WPF then managed code would be what you want to take a look at.
  • It depends. Micro Focus COBOL already is a managed language. It can interoperate with other languages.

    showbox

  • It depends. Micro Focus COBOL already is a managed language. It can interoperate with other languages.

    showbox

  • It depends. Micro Focus COBOL already is a managed language. It can interoperate with other languages.

    showbox