Using managed code has many advantages such as:
- Micro Focus COBOL already is a managed language:
- The COBOL language has been extended over the years and supports a lot of the features in the .NET framework and in the JVM.
In most cases, in order to move to managed code you can simply recompile the existing COBOL code to managed code in Visual
COBOL. Also, there is a Compiler directive, ILSMARTLINKAGE, that you can use to recompile to managed code (see the
Examples further on in this section). ILSMARTLINKAGE enables COBOL to interoperate with C# JAVA.
- Take full advantage of the capabilities of the .NET framework/the JVM:
-
- Use the runtime services provided by the CLR or the JVM - these provide for integrity and the security of your COBOL applications,
and provide exception handling and garbage collection. As the runtime services optimize how your code executes, this results
in improved application performance over time.
- Improve your application performance - the .NET framework and JVM apply many optimizations including ones based on how the
code is actually executed at runtime so it could make optimizations that a static analysis cannot perform.
- Create your own managed COBOL objects - with managed COBOL you can do a lot of what you can do with any other managed language
- you can create your own methods, classes, delegates, and interfaces. See
An Introduction to Object-Oriented Programming for COBOL Developers, available from the
Product Documentation section on the
Micro Focus
SupportLine Web site -
click here to download it.
- Easy to learn if you have experience with other managed languages - learning managed COBOL doesn't differ from learning any
other managed language. If you already program in other managed languages, you only need to learn the syntax rules.
- Access a variety of reusable libraries of code - the .NET framework and the JAVA SDK include large libraries of reusable
code snippets and constructs which you can reuse directly in managed COBOL code. This means you can easily solve just about
any programming task, be more productive in your work, and get more done.
- COBOL can interoperate with other languages:
-
- Since all managed languages compile to the same IL (in .NET)/byte code (JVM), COBOL compiled to managed code can talk to
other managed applications written in any other managed language, or be deployed on other managed platforms.
- COBOL can interoperate with other languages - other languages can call COBOL and vice versa.
- Debug COBOL and parts of your application in other managed languages together. You can step between the COBOL part and the
part in the other managed language.
- Create new, modern user interfaces:
-
- Using managed code is a great way to modernize the look and feel of your applications through the use of technologies such
as WPF (in .NET)
.
- Deploy to Java application servers:
- Java application servers are required when you provide "thin" client architecture for your applications. The users use a thin
client installed on their machines to communicate with the main program which is deployed on the application server and processes
all users' requests.
Visual COBOL supports all major Java application servers (Tomcat, JBOSS, Websphere, WebLogic) and enables you to create and deploy COBOL
applications on Java application servers as COBOL Web services or JSPs.
- Create applications for deployment on the Web and mobile:
- Modern application servers are designed to be used by applications written in a managed language such as C#, Java, and managed
COBOL. Using native COBOL for applications you upload to the server might not be possible or could lead to instabilities if
the native program terminates due to an error condition.