Importing Existing COBOL Code into Visual COBOL

You can open, edit, compile and debug individual COBOL files in Visual COBOL or you can open a Net Express project file from within Visual COBOL which imports the code and converts the project to a Visual Studio COBOL project.

To load a file in the IDE

You can open your existing COBOL files in Visual COBOL as standalone files and edit them without a project. Either double-click such a file in Windows Explorer or, in the IDE click File > Open > File and browse to select the file and open it.

There is basic support in the IDE for editing, compiling and debugging of files that are not part of a project. To take advantage of all features that the IDE offers for compiling, editing and debugging, , it is recommended to add the file to a project. The easiest way to add a standalone file to a project is to right-click in the editor, click Create COBOL Project and then specify your preferences for the new projects.

To import Net Express projects

The Net Express project format is not the same as the project format in Visual COBOL for Visual Studio 2012 so it is not possible to edit Net Express projects in Visual COBOL directly.

You can open a Net Express project in Visual Studio using the Net Express Project Import wizard. The wizard converts the Net Express project into one or more Visual Studio projects. Click File > New > Import Net Express Project. The wizard analyzes your Net Express project, converts it to the appropriate project type and sets Compiler directives as needed.

To import files into an existing project

In Visual Studio, you can add COBOL files to a project using the Add Existing COBOL Items in Solution Explorer. Visual COBOL imports the files into the project and, if specified in the Add Existing COBOL Items wizard, scans the files to determine which files are programs or copybooks and sets the appropriate build actions on them. It also sets the COBOL dialect and EXEC SQL directives as specified in Tools > Options > Micro Focus > Directives > COBOL.

To scan files and set Compiler directives

After importing your existing sources into a project in the new IDE, you need to set the required Compiler directives.

In Visual Studio, to set Compiler directives on native COBOL files, use the file properties, or the Determine Directives command from the context menu for the files in Solution Explorer. This triggers file scanning and sets directives as specified in Tools > Options > Micro Focus > Directives > COBOL.