Tutorial: Application Migration - Adding Function Emulation

Takes you through the process of adding SQL function emulation to a DB2 application, and migrating that application from DB2 to SQL Server using HCOSS.
The demonstrated function emulation includes:
  • Adding math functions to SQL Server that represent standard math functions in DB2
  • Mapping the DB2 functions to the new SQL Server functions using the Customize SQL Name Mapping tool

This tutorial also demonstrates binding the application using a post-build event in Eclipse.

Prerequisites

  • If you have not already done so, review the Assumptions and Before you begin a tutorial section in the Tutorials: HCO for SQL Server (HCOSS) topic to ensure your environment is set up properly.
  • Before attempting this tutorial, you must first work through the steps in Tutorial: Prepare for Application Migration.

Eclipse project - FunctionEmulation

The Eclipse project we provide for this tutorial contains the FunctionEmulation project, which is a native COBOL project. The MFunctionEmulation project is a JVM COBOL project. However, the COBOL code is the same in both projects.

The project also contains the program , which is a COBOL SQL program that does not contain function emulation in its initial form.

The demonstration Eclipse project and its components are located in the %PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\SQL\hcoss\FunctionEmulation directory by default.

Sequence

To complete this tutorial, progress through these topics in the order presented here. The bottom of each topic provides Next topic and Previous topic navigational links to help you proceed in the proper sequence: