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 HiRDB C API Conversion

Ispirer MnMTK database and application migration tool is a cost effective product that can cater unique business requirements. Our flexible tool is constantly evolving. We place our greatest stress to helping our customers to run a smooth database and application migration and accomplish a wide variety of tasks.

Oracle Pro*C to HiRDB C API Conversion

Conversion for Embedded SQL statements is based on initial implementation Oracle to HiRDB.

Conversion Features:

Connect Database/Transaction control Conversion

  • CONNECT statement with CHAR variables:

    Oracle Pro*C:

    1.  
    2. CHAR *userid = "SCOTT";
    3. CHAR *password = "TIGER";
    4.  
    5. EXEC SQL CONNECT :userid IDENTIFIED BY :password;
    6.  

    HiRDB C API:

    1.  
    2. EXEC SQL BEGIN DECLARE SECTION;
    3. /* SQLWays Variable for username /Password */
    4. CHAR SQLWays_userid[9];
    5. CHAR SQLWays_password[31];
    6. EXEC SQL END DECLARE SECTION;
    7.  
    8. CHAR *userid = "SCOTT";
    9. CHAR *password = "TIGER";
    10.  
    11. sscanf(userid, "%8s", SQLWays_userid);
    12. sscanf(password, "%30s", SQLWays_password);
    13.  
    14. EXEC SQL CONNECT USER :SQLWays_userid
    15. USING :SQLWays_password;
    16.  
  • CONNECT statement with VARCHAR variables:

    Oracle Pro*C:

    1.  
    2. VARCHAR userid[128];
    3. VARCHAR password[32];
    4.  
    5. EXEC SQL CONNECT :userid IDENTIFIED BY :password;
    6.  

    HiRDB C API:

    1.  
    2. EXEC SQL BEGIN DECLARE SECTION;
    3. /* SQLWays Variable for username/Password */
    4. CHAR SQLWays_userid[9];
    5. CHAR SQLWays_password[31];
    6. EXEC SQL END DECLARE SECTION;
    7.  
    8. struct{
    9. UNSIGNED short len ;
    10. UNSIGNED CHAR arr[128] ;
    11. }userid;
    12.  
    13. struct{
    14. UNSIGNED short len ;
    15. UNSIGNED CHAR arr[32] ;
    16. }password;
    17.  
    18. sscanf(userid.arr, "%8s", SQLWays_userid);
    19. sscanf(password.arr, "%30s", SQLWays_password);
    20.  
    21. EXEC SQL CONNECT USER :SQLWays_userid
    22. USING :SQLWays_password;
    23.  

 

Cursor Conversion

  • Select query in Cursor statement conversion based on the implementation of Oracle to HiRDB

    Oracle Pro*C:

    1.  
    2. EXEC SQL DECLARE EMPCUR CURSOR FOR
    3. SELECT CONCAT(JOB,ENAME), EMPNO
    4. FROM EMP
    5. WHERE DEPTNO = :deptno;
    6.  

    HiRDB C API:

    1.  
    2. EXEC SQL DECLARE EMPCUR CURSOR FOR
    3. SELECT JOB || ENAME, EMPNO
    4. FROM EMP
    5. WHERE DEPTNO = :deptno;
    6.  

 

DML Query Conversion

  • Select, Insert, Update, Delete statements conversion based on the implementation of Oracle to HiRDB

    Oracle Pro*C:

    1.  
    2. EXEC SQL
    3. SELECT EXTRACT(YEAR FROM C1), EMPNO
    4. INTO :ename, :empno
    5. FROM EMP
    6. WHERE EMPNO = :empno;
    7.  

    HiRDB C API:

    1.  
    2. EXEC SQL
    3. SELECT YEAR(C1), EMPNO
    4. INTO :ename, :empno
    5. FROM EMP
    6. WHERE EMPNO = :empno;
    7.  

 

Procedure Call Conversion

  • Call statement in PL/SQL Block conversion

  • Removing Package name

    Oracle Pro*C:

    1.  
    2. EXEC SQL CALL myschema.mypkge.fact(:num);
    3.  

    HiRDB C API:

    1.  
    2. EXEC SQL CALL myschema.fact(:num);
    3.  

 

Indicator Variables Conversion

  • Remove keyword INDICATOR

    Oracle Pro*C:

    1.  
    2. EXEC SQL
    3. SELECT C3,C4 INTO
    4. :vnum INDICATOR :vnum_ind FROM T2;
    5.  

    HiRDB C API:

    1.  
    2. EXEC SQL
    3. SELECT C3,C4 INTO
    4. :vnum:vnum_ind FROM T2;
    5.  

 

Declare Host Variables Conversion

  • Commenting SQLCA, SQLDA, ORACA

    Oracle Pro*C:

    1.  
    2. EXEC SQL INCLUDE SQLCA;
    3. EXEC SQL INCLUDE SQLDA;
    4. EXEC SQL INCLUDE ORACA;
    5.  

    HiRDB C API:

    1.  
    2. /* EXEC SQL INCLUDE SQLCA; */
    3. /* EXEC SQL INCLUDE SQLDA; */
    4. /* EXEC SQL INCLUDE ORACA; */
    5.  
  • File’s includes conversion

    Oracle Pro*C:

    1.  
    2. EXEC SQL INCLUDE C:\script\INCL.h;
    3. EXEC SQL INCLUDE C:\script\INCL;
    4.  

    HiRDB C API:

    1.  
    2. #include "INCL.h"
    3. #include "INCL"
    4.  
  • #include Oracle headers commenting

    Oracle Pro*C:

    1.  
    2. #include <oraca.h>
    3. #include <sql2oci.h>
    4. #include <sqlapr.h>
    5. #include <sqlca.h>
    6. #include <sqlcpr.h>
    7. #include <sqlda.h>
    8. #include <sqlkpr.h>
    9. #include <sqlucs2.h>
    10.  

    HiRDB C API:

    1.  
    2. /* #include <oraca.h> */
    3. /* #include <sql2oci.h> */
    4. /* #include <sqlapr.h> */
    5. /* #include <sqlca.h> */
    6. /* #include <sqlcpr.h> */
    7. /* #include <sqlda.h> */
    8. /* #include <sqlkpr.h> */
    9. /* #include <sqlucs2.h> */
    10.  

 

Extension Conversion

  • Converts .PC extension to .EC

 

Why Ispirer MnMTK?

Ispirer MnMTK automates the migration process of your Oracle Pro*C applications to HiRDB C API. Moreover, with SQLWays you eliminate most of associated risks and considerably reduce internal efforts. All these benefits are available at very reasonable and competitive costs, which makes Ispirer MnMTK even more attractive instrument for this project type.


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

 
Testimonials
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.

...

Feedback

We’re successfully tested the tool and we’re interested in buying the licence.

Read more
Industry Events