The easiest way to provide COBOL services to a .NET assembly is to use one of ACUCOBOL-GT's .NET compiler options to generate managed objects that can call your ACUCOBOL-GT program. These objects are compiled in Microsoft Intermediate Language (MSIL), so they can be managed directly by the .NET Common Language Runtime (CLR). They are MSIL stubs capable of calling the ACUCOBOL-GT run time and executing your .acu object.
There are two compiler options that you can use for this purpose:
Compiler Option | Description |
---|---|
--netexe | Generates a .NET executable file from your COBOL source.
By default this command generates a .NET Version 2.0-compatible assembly or the latest version if 2.0 is not installed. You can also specify the desired version by adding the appropriate qualifier to the option. For example: --netexe:2.0 verifies that .NET Version 2.0 is installed and generates a 2.0-compatible assembly if so. Valid versions include 2.0, 2.0, 3.5, and 4.0. |
--netdll | Generates a .NET dynamic link library (DLL) file from your COBOL source.
By default this command generates a .NET Version 2.0-compatible assembly or the latest version if 2.0 is not installed. You can also specify the desired version by adding the appropriate qualifier to the option. For example: --netdll:2.0 verifies that .NET Version 2.0 is installed and generates a 2.0-compatible assembly if so. Valid versions include 2.0, 2.0, 3.5, and 4.0. |