Previous Topic Next topic Print topic


Tutorial: Build and Run the Application

Requirements
Before attempting this tutorial, you must complete the following tutorials in the order listed:
  • Tutorial: Create a SQL Server Database
  • Tutorial: Create and Configure a Visual Studio Project
  • Tutorial: Set OpenESQL Assistant Configuration Options
  • Tutorial: Catalog a Connection
  • Tutorial: Build and Test a Query
  • Tutorial: Generate and Embed an SQL Program
  • Tutorial: Provide Additional Code
Phase 1: Add the Generated Copybook to the Project
While the OpenESQL Assistant generated and saved the copybook necessary to compile the application, it does not automatically add the file to the current project. The copybook must be part of the project to be included in the compiled application.
  1. From the Solution Explorer, right-click the OESQLAssistantTutorial project and select Add > Existing Item.
  2. Select EMP.cpy; then click Add.

    The EMP.cpy copybook is added to the project.

Phase 2: Add a Break Point
The program sends output to the console, and we want the application to pause at the point where we can see the output.
  1. If it isn't already in the program editor, double-click Program1.cbl from the Solution Explorer to call it up into the program editor.
  2. In ther program editor, scroll down to the following line of code:
    EXEC SQL DISCONNECT CURRENT END-EXEC
  3. Press F9 to toggle a break point.
  4. Save Program1.cbl.
Phase 3: Build the Application
  1. From the Solution Explorer, right-click the OESQLAssistantTutorial project and select Build.
Phase 4: Run the Application
  1. Press F5 to start debugging.
  2. If the console is not visible, minimize Visual Studio. You should see the console output.
  3. Press F5 again to complete the debugging process.

This completes the OpenESQL Assistant tutorials.

Previous Topic Next topic Print topic