There are a number of things you need to consider before you start using .NET COBOL in your existing applications. You need to analyze your current application - its structure and build method - and take decisions about how these should change.
Micro Focus Professional Services is here to assist you with the transition of your application to .NET COBOL.
See below some of the areas that you need to consider.
The complexity of your application (such as number of programs and interconnection between the programs) and the method used to compile natively play a significant role in how easily you can move to .NET COBOL. The factors include:
Your original native COBOL application might be using batch scripts executed at the command line to compile. The way you compile the application is likely to change meaning you might need to adopt new and improved procedures for compiling your code.
If the batch scripts place any executable files in a certain directory structure, then this might have to change as well.
When updating to .NET COBOL, you might need to invest in skills that will help you be successful in maintaining your applications. For example:
These are handled differently in .NET COBOL code. You need to understand how to package the application and deploy it under .NET.
You can use OpenESQL with the SQL(DBMAN=ADO) directive to compile your .NET COBOL applications. Micro Focus tries to maintain as much source code compatibility as possible between the OpenESQL native and managed code run-time systems. Although each run-time system has extensions, limitations, and differences that are imposed by the underlying database APIs and execution environments, the majority of embedded SQL statements such as DECLARE CURSOR, OPEN, FETCH, CLOSE, SELECT, INSERT, UPDATE, DELETE, CONNECT, DISCONNECT, COMMIT and ROLLBACK, are completely compatible and require no change.
The ADO.NET run-time system has extensions that support offline DataSets and DataTables using EXEC ADO statements. It also supports object host variables as well as traditional COBOL host variables.
The following restrictions apply to database support in .NET COBOL code:
The workaround is to move it to .NET COBOL code with the OpenESQL SQL directives (DBMAN=ADO TARGETDB=ORACLE PROCOB). See these SQL directives under Database Access for more information.
.NET COBOL code is a great way to modernize your Dialog System applications through Enterprise Developer for Visual Studio 2017. As a first step, you can import the application in Enterprise Developer and build and run it in the new IDE. Next, you can start modernizing the application gradually. For example, you can replace one Dialog System screen with a Windows Form or wrap a .NET user control as an ActiveX control and use that in Dialog System. Meanwhile, you can keep the rest of the code unchanged. For more details about the range of techniques for modernization, see Modernizing Dialog System Applications.
Certain library routines are only supported in native code. See the Library Routines section of this documentation for details on the routines you can use in .NET COBOL code.
You can call native code from .NET COBOL code although there are some environments that could prohibit this. For example, it is not possible to call native COBOL from .NET stored procedures or from certain Java application services.
Combining native and .NET COBOL code within the same application could be restricted in some aspects especially when trying to debug the code and deploy it under .NET.
Enterprise Developer offers great options for modernizing your application's user interface. You can use Windows Forms or the Windows Presentation Foundation in .NET. Be aware that there might be potential issues depending on the application architecture and how tightly the original user interface is tied to the back-end module.
You can still write and use procedural COBOL that compiles and runs in managed environments such as the .NET framework . However, to take full advantage of all features available in a managed environment, and to be able to expose your code to other managed languages, you might need to start using .NET COBOL syntax. For information about writing .NET COBOL code, explore the following resources:
Examine your existing procedural COBOL code for any third-party APIs that make calls to the operating system. Technology provided by other software vendors might need to be rewritten for use with .NET COBOL code.
The Win32 API routines are not supported in .NET COBOL code. When you move procedural code to .NET COBOL, you need to remove calls to the Win32 API routine and, instead, use an equivalent .NET feature to achieve the desired results.