Does Micro Focus Visual COBOL compile directly to MSIL?

1k views Asked by At

I am reviewing solutions for migrating COBOL code to the .NET runtime. The two most promising solutions I have found online are NetCOBOL and Micro Focus Visual COBOL.

NetCOBOL compiles directly to MSIL and has Visual Studio integration. By "compiles directly", I mean that the emitted MSIL represents the actual calls in the COBOL code. This is in contrast to an approach, where the MSIL code would perform lexical analysis on the COBOL code and then interpret/execute it.

Micro Focus Visual COBOL definitely has Visual Studio integration, but I could not find a clear answer on the website as to whether or not the COBOL code is compiled directly to MSIL or is processed by an interpreter.

I am not sure if the semantics I am using here are 100% accurate, but and I am open to suggestions as to how to more clearly express the distinction between emitted code that is "compiled directly" and emitted code that is "interpreted".

2

There are 2 answers

1
Lex Li On BEST ANSWER

You should do a better Internet search and limit the scope to microfocus.com,

http://community.microfocus.com/microfocus/cobol/visual_cobol/w/wiki/470.managed-cobol-an-overview.aspx

Then you can obviously see

ilgen directive compiles to CIL

This article also indicates how Visual COBOL works for JVM.

0
tsturzl On

Never really used COBOL for anything. I'd imagine they'd both compile them to CIL, probably using the DLR. So perhaps keep an eye on what system you're distributing on, if its a .NET compact install it won't support DLR.

I'd honestly rewrite it in a more modern language, because you're probably going to have to change the code to work properly on the .NET framework, seeing as you don't have your standard libraries. Unless either of those compilers implement standard library wrappers.

C# is pretty easy to understand, and if you're set on dynamic typing you can use IronPython or IronRuby.

If you're set on using COBOL, I'm sure both of those compilers compile to CIL, otherwise they're technically interpreters or bytecode compilers. I doubt anyone would make a bytecode compiler/interpreter that compiled to CIL.