THIS SITE USES COOKIES: By continuing to browse this site, you give your consent for cookies to be used.
For more details, please read our Privacy Policy and Cookies Policy.

Automated and Customizable
Database and Application
Migration and Modernization

Oracle Pro*C to ECPG Conversion

An Oracle Precompiler and ECPG are programming tools that enable the user to embedd SQL statements in a high-level source program.

The Oracle Pro*C and ECPG statements are similar but have some differences in:

  • SQL function
  • Work with multithreaded
  • Using host variable
  • Header files, and others

Conversion features

Ispirer MnMTK tool automatically detects EXEC SQL statements and host variables, converts them and pastes additional code.

Oracle Pro*C example (file: simple.pc):

void simple_func (int id)
    int   check_id = 0;
        SELECT NVL(ID, 0)
        INTO   :check_id
        FROM   customer
        WHERE  SET_ID = :id;

After conversion simple.pc file is converted to simple.pgc (file for ECPG Precompiler):

EXEC SQL INCLUDE simple.pgh;
void simple_func(int id)
   EXEC SQL int  check_id = 0;
   SELECT coalesce(ID,0)
   INTO   :check_id
   FROM   customer
   WHERE  SET_ID = :id;

In this example you can see the converted EXEC SQL statement. Note that declare host variable is converted to EXEC SQL declare statement. Also SQLWays tool creates simple.pgh file (header file for simple.pgc) and adds EXEC SQL INCLUDE statement.

Simple.pgh file contains EXEC SQL statement for declare variable, which is a parameter for simple_function.

In the example there is one declare statement:

EXEC SQL  int id;

Please complete the questionnaire to initiate collaboration discussions for your project or get some rough estimation:

If you are interested in these services, please contact us for more information.

November 25, 2013Ciber, Sweden
Oracle to Microsoft SQL Server Migration
(including PowerBuilder migration)

"Ciber develops system for parking permits to the major cities in Sweden.
In 2012, when the second largest city in...


August 21, 2014TouchStone Systems, Inc., United States
Sybase ASA to Microsoft SQL Server Migration
(including embedded SQL migration in PowerBuilder)

"To whom it may concern,

Being a leading provider in reverse logistics solutions, we continue to...


Case Studies
August 24, 2014PostgreSQL to Oracle Migration, United States (including embedded SQL migration in Java)

The client was a U.S.-based, non-profit organization working within the education sector, striving to ensure equal rights of students in low-income groups across the United States. This was...


September 11, 2014Informix to SQL Server Migration, United States (including embedded SQL migration in PowerBuilder, Visual Basic to C#, ASP to ASP.NET)

A U.S.-based renowned lessor of trailers requested the services of Ispirer to perform a major migration.



Everything went very well, thank you! We did convert everything that we needed without a problem! It was perfect and we have the output we need. Thank you!

Read more
Industry Events