VX/SQLMOD Convert Rdb SQLMOD to Oracle Pro*C - OpenVMS Migration

VX/SQLMOD converts Rdb Sqlmod to Oracle Pro*C. Pro*C is written to a C or C++ source file for compiling an linking in place of the Rdb SQLMOD.

Learn More


Application programs on Open VMS can access Rdb data by having the Rdb directives embedded in the application code or by using SQLMODs, which contain procedures that include Rdb directives. These procedures can be used by multiple programs. SQLcc is a migration tool that takes in the source code for SQLMODs and produces something we call an SQL Procedure Container (SQLPC.) The various procedures in the original SQLMODs also exist in the SQLPC with the underlying Rdb directives within these procedures transformed into Oracle Pro*C directives.

SQLPC use Oracle Pro*C

The SQLPCs modules generated by SQLcc are coded in pro*C, the Oracle supported language for Oracle access. SQLcc reads the data libraries associated with the SQLMOD and generates the required C support files for the SQLPC module and its various procedures. SQLcc detects where data conversion needs to occur and generates the code for those conversions. The generated SQLPC code is highly maintainable are resembles closely the original SQLMOD. SQLcc modifies the various SQL calls so the current syntax is now Oracle-ready and conforms to the business logic of the original SQLMOD procedures. The generated SQLPC module is ready to go through pro*C the Gnu C compiler to become a compiled object that can be used with Fortran, COBOL, C and C++ application code.

Performance enhancements in Oracle

A big difference between Rdb and Oracle usage is that Oracle servers are usually network attached to application servers whereas VMS servers usually runs the Rdb server and the application server on the same server. This makes Rdb throughput faster that equivalent Oracle throughput, the difference between direct-attached storage and networked servers. SQLcc compensates for this by using features only available in Oracle to transfer large amounts of data over the network, yet requires no changes to the application code which will continue to interface to the SQLPC procedures exactly as it was interfacing with the original SQLMOD procedures. SQLCC detects the need for this bulk fetch technique and generates the requisite code in the SQLPC to make use of this feature.

Data Type Transformations

The SQLPC procedures are engineered in a way so specific Rdb data types are automatically transformed to and from Oracle data types. Examples of those include the transformation of Oracle date to/from VMS date and the use of Rdb "Tinyints" and Oracle single character. By automatically doing these transformations in the SQLPC, the application code does not have to be modified in any way to accommodate these data storage differences and the code is immediately available for use


Oracle DATE to/from MJD OpenVMS DATE
Tinyints to/from single CHARs


.NeEd More Here


NeEd More Here

Sqlmod Example


Pro*C Example