Previous Topic Next topic Print topic


Tutorial: Create and Configure a Visual Studio Project

In this tutorial, you create a Visual Studio Managed COBOL project to use as you complete the remainder of these tutorials.

Requirements
Before attempting this tutorial, you must complete Tutorial: Create a SQL Server Database.
Phase 1: Launch Enterprise Developer for Visual Studio 2015
  • Click Start > All Programs > Micro Focus Enterprise Developer > Enterprise Developer for Visual Studio 2015.
    Note: To start Samples Browser on Windows 8 and Windows Server 2012, go to the Start screen and click the Samples tile.
Phase 2: Create a New Managed COBOL Project
In this set of tutorials, you create a Managed COBOL application to take advantage of the features available in the ADO.NET connection editor, and the OpenESQL Managed Runtime.
  1. From the Visual Studio IDE, click File > New > Project.
  2. Under Installed Templates, click COBOL > Managed.
  3. Click Console Application.
  4. In the Name field, type OESQLAssistantTutorial.
  5. In the Location field, specify a directory in which to store the project; then click OK.

    Visual Studio creates a new solution and a project named OESQLAssistantTutorial. The project contains one generic program, Program1.cbl, that we use in a later tutorial. If Visual Studio has automatically opened this file for editing, close it for now.

Phase 3: Set Project Properties
To compile this application such that it connects to the database via ADO.NET, we must set the project properties to include the DBMAN=ADO SQL compiler directive option. We must also set the BEHAVIOR compiler directive to provide optimal cursor behavior, including isolation level and lock concurrency settings.
  1. From the Solution Explorer, double-click Properties under your OESQLAssistantTutorial project.
  2. On the SQL tab, select OpenESQL from the ESQL Preprocessor drop-down list; then click Add.
  3. On the Available Directives list, click DBMAN; then click OK.
  4. From the Value drop-down, select ADO.
  5. Click Add.
  6. On the Available Directives list, click BEHAVIOR; then click OK.
  7. From the Value drop-down, select ANSI.
  8. Save your changes and close the Properties window.

This concludes this tutorial. Please continue with Tutorial: Set OpenESQL Assistant Configuration Options.

Previous Topic Next topic Print topic