Duplicate the Process for the MFunctionEmulation Project

Provides instructions for running the same steps to analyze, build, bind, and run the MFunctionEmulation application, which is an ADO.NET managed version of FunctionEmulation.

Analyze the MFunctionEmulation project

  1. In the Solution Explorer, double-click the Properties entry for the MFunctionEmulation project.
  2. Click the SQL tab.

    Notice the directive settings for the OpenESQL ESQL Preprocessor include SQL(DBMAN=ADO). This means that we're using the ADO.NET database connection rather than the ODBC database connection.

Define a post-build event

  1. From the Properties window add a post-build event to execute the following command (same command you used for the FunctionEmulation project):
    DSN SYSTEM(HCODemo) @"$(ProjectDir)FunctionEmulation.hcodsn"
  2. Close the Properties window.

Build and bind the FunctionEmulation program

  1. In the Solution Explorer, right-click the MFunctionEmulation project and select Set as StartUp Project from the context menu.
  2. Again, right-click the MFunctionEmulation project, but this time select Build from the context menu.

Run the MFunctionEmulation application

  1. From the Solution Explorer in Visual Studio, open the FunctionEmulation.cbl source file.
  2. Set a break point on the goback line.
  3. Click Debug > Start Debugging to debug the application.

    You should see the same data output that you saw when you ran the FunctionEmulation native application.

This completes the tutorial.