There are different ways in which you can start using Visual COBOL to develop your applications created with a legacy Micro Focus product such as Net Express, Server Express, or Mainframe Express.
The quickest approach would be to open individual files in Visual Studio and use the IDE to edit, compile and debug them. The approach that Micro Focus recommends is to create a Visual Studio project and take advantage of the many project-handling features offered by Visual COBOL.
The following sections highlight stages of the development process where Micro Focus has recommendations about the best way to proceed when upgrading large projects.
Regardless of whether you have used a project file before, Micro Focus recommends that you create one or more projects in Visual COBOL for your application files. Using a project file means all of the Visual Studio productivity features will be available to you. See Working with Projects for more information.
If you have a Net Express project for your application, note the following:
There are a few different ways to create Visual Studio projects and add your source files to them:
Visual COBOL provides the following project types:
Visual Studio project type | Description |
---|---|
Native application | Choose this type for any existing application that you used to compile in your legacy Micro Focus product or at the command line. |
Windows Desktop application | Choose this project type if you want to take advantage of the functionality of the .NET framework and extend your applications.
Your existing native COBOL applications should compile in a .NET COBOL project without any changes required. The benefits of switching to a .NET Windows Desktop project include:
Restriction: Code analysis is not available in
.NET COBOL projects.
|
Tab size in legacy Micro Focus products (such as Net Express) defaulted to eight spaces while it is four spaces by default in Visual Studio. This means that you might get compiler errors when you try to compile your COBOL sources in Visual COBOL.
If you have your application's Net Express project, you can use the Net Express Project Import wizard in Visual COBOL to upgrade the application. The wizard automatically converts the tabs to four spaces.
If you use another method to import the files into Visual Studio, the tabs will not be converted automatically. In such cases, Micro Focus recommends that you set the SOURCETABSTOP"4" Compiler directive that converts tabs to four spaces.
Do not change the size of the tabs in the Visual Studio preferences, as these preferences apply to all other programming languages you might be working on in the IDE.
Micro Focus recommends that you use spaces instead of tabs in Visual COBOL.
Micro Focus continues to enhance the COBOL language. New Micro Focus product releases use newer levels of the COBOL language where each level has new words added to the list of reserved COBOL keywords.
When you are upgrading an application from a product that uses an earlier level of the COBOL language, you might find that some of the variable names are now reserved words. See the Upgrade Guide for how you can solve this problem.
To avoid confusion, Micro Focus recommends that you rename the variables whose names that are now reserved words.
Note that some functionality that was available in older Micro Focus products might work differently or be superseded in Visual COBOL. See Differences between Enterprise Developer and Net Express and Mainframe Express in the Upgrade Guide for more.