Previous Topic Next topic Print topic


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 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.

Previous Topic Next topic Print topic