To migrate an application, you start by opening a
Net Express project in
Visual COBOL. This invokes the Visual Studio Conversion Wizard that converts the project into aVisual COBOL solution. Alternatively, you can create a solution manually and add the files from the Dialog System application to it.
There is one Dialog System specific item that is added to the project and that is the screenset, the
.gs file. The wizard sets the following properties on the screenset file and you need to do the same if you create the project manually:
- Copy to Output Directory is set to
Copy if newer. This ensures that the screenset is added to the output directory whenever the screenset is changed.
- Build Action
is set to
Content. This ensures that the screenset is not compiled and consequently doesn't create spurious warnings or errors.
When the Dialog System application is in
Visual COBOL, you can continue to maintain and run it with
Visual COBOL, as shown here:
In
Visual COBOL, you can:
- Open the screenset, by double-clicking the
.gs file in Solution Explorer. This starts Dialog System with the screenset open, ready for you to edit.
- Edit a
.cbl file by double-click it in Solution Explorer.
- Build and debug the application. Although debugging COBOL is supported, the screenset animator is not supported.
- Run the application.
Debuggable OO Class Libraries
If your application uses the native OO COBOL class libraries, and you want to step into those libraries when debugging, you need to build debuggable versions of them. This is different from
Net Express, where the libraries were supplied and you could select them from the IDE. To build and use debuggable versions of the libraries:
- Open the project for the required class library. The projects are located in the
cpylib folder of your installation, which is by default
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2015. The class library projects are:
- GUI class library -
guicl\apiguim.cblproj
- OLE class library -
olecl\olecl.cblproj
- Base class library -
basecl\baseclm.cblproj
- Ensure the Debug configuration is selected and then build the project. The resulting output is stored in the
debug subfolder of the project folder.
- In your application, set the COBPATH environment variable to point to the folder containing the debuggable version of the library. To do this, add the variable to the
application.config file, as follows:
- Open your application in
Visual COBOL.
- Right-click your main project and click
.
- Double-click
Application.config in Solution Explorer.
- In the
Name field, specify COBPATH.
- In the
Value field, specify the full path of the folder. For example,
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2015\cpylib\guicl\debug.
- Click
Set.
Note: The Help for the class libraries is available in the file
nxrclr.chm, which is installed in the Help folder of your installation. The default location is
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2015\Help.