🚨 Oracle not porting Rdb to x86 and EOL on Itanium 12/2027 🚨
FAQs

Rdb to Oracle & PostgreSQL: Seamless Database Migration

Learn how Sector7's VX/SQLMOD and VX/ESQL-FORTRAN migrate OpenVMS Rdb databases and embedded SQL to modern Oracle or PostgreSQL environments.

Preserve Your Rdb Investment

VX/SQLMOD automatically converts Rdb SQLMOD procedures and handles embedded SQL, ensuring your applications access modern databases without code changes.

Which databases can VX/SQL-MODULE target?

PostgreSQL (the reference, most tested driver), MySQL/MariaDB, Microsoft SQL Server (via ODBC), any ODBC data source, Oracle (via the OCI client) and SQLite. The database is chosen at run time by configuration, so the same generated modules move between back ends without rebuilding.

What is the difference between the direct-API and embedded-SQL output flavours?

Direct API (-m psql) emits pure C that calls the VX/SQL runtime directly and compiles in one step with no embedded-SQL pre-compiler. Embedded SQL (-m esql) emits C containing EXEC SQL, processed by a second ecpg pass, when you want the generated code to stay as readable embedded SQL. Both come from the same .sqlmod source and link the same runtime, so each can validate the other. Embedded SQL is the default output.

Does VX/SQL-MODULE require Oracle Pro*C to reach Oracle?

No. Oracle is reached through the runtime's Oracle OCI driver. The tool does not depend on Oracle Pro*C, so you do not need the Pro*C pre-compiler toolchain.

Do my Fortran, COBOL, C or C++ programs that call the SQLMOD need to change?

No. The generated modules preserve the exact SQLMOD procedure-call interface (an extern "C" ABI), so existing callers keep the same calling sequence and are not rebuilt for the interface change.

How are CDD record parameters handled?

A RECORD ... END RECORD parameter, optionally sourced from a CDD dictionary path, becomes a C struct and is bound field by field, so SELECT ... INTO :record populates every column. Domains resolve through CDD to C typedefs, and VMS CDD data-type definitions can be extracted into C headers.

What happens to VMS quadword dates when the data lives in PostgreSQL or Oracle?

VMS quadword date and time parameters are converted to and from SQL TIMESTAMP automatically. Dates are stored as normal timestamps in the target database, so other tools can read them, while your application keeps sending and receiving VMS quadwords with no application change.

Will migrated procedures still see the same Rdb error codes?

Yes. VX/SQL-MODULE provides an Rdb-compatible SQLCA and maps Rdb SQLCODE and SQLSTATE, so procedures that inspect sqlca.sqlcode behave as they did under Rdb.

Why should we migrate off Rdb SQLMOD now?

Oracle Rdb reaches end of life in December 2027 and is not being ported to x86 OpenVMS. VX/SQL-MODULE gives SQLMOD-based applications a supported path onto modern platforms and open back ends, which reduces licensing cost, while preserving the procedure interface so the application itself is largely unchanged.

What does VX/SQL-COBOL actually produce from my COBOL source?

The vxsql preprocessor rewrites each EXEC SQL block into ordinary COBOL CALL "S7..." statements and writes a binary .cbsql.map sidecar that captures host-variable types and null indicators. The result is still COBOL: it is compiled by your native COBOL compiler and linked against the VX/SQL runtime. It is not converted into C or C++.

Which databases can VX/SQL-COBOL target, and do I rebuild to switch?

PostgreSQL is the reference and most tested driver, alongside MySQL/MariaDB, Microsoft SQL Server (via ODBC or FreeTDS), Oracle (via the OCI client), SQLite, and any ODBC data source. Each build links one runtime library, so within a driver family a program repoints by changing its connection string. Moving to a different database engine means relinking against that engine's runtime library.

Why can't I just use ECPG or Oracle Pro*C on my COBOL?

Both the PostgreSQL ECPG preprocessor and Oracle's Pro*C process embedded SQL in C and C++ only. Neither handles embedded SQL in COBOL. That is the gap VX/SQL-COBOL fills: it is the COBOL-aware embedded-SQL preprocessor those tools do not provide.

Do I have to change my COBOL source, EXEC SQL, or SQLCODE checks?

No. Existing EXEC SQL blocks, CDD includes, and SQLCODE branches keep working. VX/SQL-COBOL is a drop-in replacement for Rdb's SQL$PRE, so the migration does not require a hand rewrite of the COBOL source.

How does VX/SQL-COBOL preserve Rdb error-handling behaviour?

It provides a 136-byte Rdb-compatible SQLCA carrying Rdb SQLCODE and SQLSTATE values: 0 for success, 100 for no data, and Rdb negatives such as -803, -811, and -913. Code that branches on SQLCODE behaves as it did under Rdb. For example, a PostgreSQL duplicate key (SQLSTATE 23505) is reported to COBOL as Rdb SQLCODE -803.

What happens to PACKED DECIMAL and VMS QUADWORD dates?

PACKED DECIMAL and COMP-3 are converted to ANSI NUMERIC, and VMS QUADWORD date/time to SQL TIMESTAMP, transparently on input and output. There is no conversion code to add in the COBOL.

How are INCLUDE ... FROM DICTIONARY (CDD) record includes handled?

They are expanded into native COBOL record declarations through the genuine CDD$ compiler-protocol interface, using Sector7's portable dictionary library on any platform or VSI CDD/Repository on OpenVMS, with the same code path either way. Because CDD is not being ported to x86 OpenVMS, VSI's VDD is a drop-in replacement in the same workflow.

Which platforms and COBOL compilers are supported?

OpenVMS x86-64 (V9.2) with native VSI COBOL, Linux with Fujitsu NetCOBOL or GnuCOBOL, and macOS for development and CI. On every platform the vxsql preprocessor and the runtime are the same, so one code base covers all three.

What is VX/SQL-FORTRAN?

VX/SQL-FORTRAN is a single-pass embedded-SQL preprocessor for FORTRAN. It reads your source, rewrites each EXEC SQL ... END-EXEC block into ordinary FORTRAN calls to the portable libvxsql runtime, and emits one preprocessed FORTRAN source file.

The original SQL is preserved as !S7 comments in the output, so you still have a readable audit trail. It is a drop-in replacement for Oracle Rdb's SQL$PRE precompiler.

Why migrate from Oracle Rdb SQL$PRE to VX/SQL-FORTRAN?

Oracle Rdb and its SQL$PRE precompiler are tied to a platform and database that many estates are moving away from. VX/SQL-FORTRAN keeps your embedded SQL in FORTRAN while opening a path to modern platforms and open or commercial back ends.

You replace SQL$PRE with VX/SQL-FORTRAN in the build, link against libvxsql-fortran, and run the same application logic against PostgreSQL, Oracle, SQL Server, MySQL/MariaDB, SQLite, or ODBC.

Do I need to rewrite my FORTRAN application?

No. VX/SQL-FORTRAN is designed so your FORTRAN source structure and application logic stay intact. You keep EXEC SQL blocks, host variables, and the same program flow.

The preprocessor emits ordinary FORTRAN that compiles with gfortran or ifx. There is no application rewrite and no intermediate language files to maintain.

Which databases does VX/SQL-FORTRAN support?

The same preprocessed FORTRAN source can target PostgreSQL (the reference target), Oracle, SQL Server, MySQL/MariaDB, SQLite, or ODBC. You choose exactly one database driver at link time.

That means one codebase can be built for different back ends without rewriting embedded SQL, which simplifies testing and phased migration.

Which platforms does VX/SQL-FORTRAN run on?

VX/SQL-FORTRAN is available on x86 OpenVMS, x86 and ARM Linux, and macOS. The preprocessor and libvxsql runtime are built for these targets so Rdb-era FORTRAN can move with your platform strategy.

Build and link steps follow normal FORTRAN toolchain conventions on each platform, with libvxsql-fortran and your chosen database driver added at link time.

How does the build process change with VX/SQL-FORTRAN?

Replace the Rdb SQL$PRE step with the VX/SQL-FORTRAN preprocessor. It takes your FORTRAN source with embedded SQL and produces a single preprocessed .f (or equivalent) file ready for your FORTRAN compiler.

Compile that output with gfortran or ifx, then link against libvxsql-fortran plus one database driver selected at link time. No separate header or include pipeline is required beyond your normal FORTRAN build.

Does VX/SQL-FORTRAN support cursors, dynamic SQL, and error handling?

Yes. Host variables, cursors, dynamic SQL (methods 1 through 4), NULL indicators, WHENEVER directives, and SQLCA-based error handling all carry through the preprocessor into calls to libvxsql.

Your existing Rdb-style embedded SQL patterns continue to work after migration, so operational code around fetches, prepares, and error branches does not need to be redesigned.

How does VX/SQL-FORTRAN fit with VX/SQL-COBOL and VX/SQL-MODULE?

VX/SQL-FORTRAN is part of the VX/SQL toolset alongside VX/SQL-COBOL and VX/SQL-MODULE. All three share the same libvxsql runtime and the same set of link-time database drivers.

Mixed-language Rdb estates with FORTRAN, COBOL, and SQLMOD modules can migrate onto one database access layer, which reduces duplication and keeps SQL behavior consistent across languages.

What is RDML and what does VX/RDML convert?

RDML (Rdb Data Manipulation Language) is the verb-keyed, record-at-a-time language Oracle/DEC Rdb embeds in host programs. VX/RDML is Sector7’s source-to-source converter that parses RDML in COBOL, BASIC, FORTRAN, C, and Pascal and rewrites it into standard EXEC SQL for PostgreSQL or Oracle.

See the VX/RDML technical page for the full verb grammar and SQL mapping reference.

Which host languages does VX/RDML support?

VX/RDML uses a shared RDML parser across five host languages. A small slicer per language finds RDML regions in the source; the same lexer, AST, expression engine, and SQL emitter run for all of them.

Supported hosts include COBOL (.rco, .cob, .cbl), Pascal (.rpa, .pas), FORTRAN, DEC/VAX BASIC, and C. Only host-variable declarations and the EXEC SQL wrapper differ per language.

Does VX/RDML require rewriting non-RDML host code?

No. VX/RDML converts RDML regions only. Surrounding COBOL, Pascal, FORTRAN, BASIC, or C logic is passed through unchanged. RDML statements such as FOR, STORE, GET, and START_TRANSACTION are translated to equivalent EXEC SQL (cursors, DML, transactions) while the host program structure stays intact.

For broader migration planning, see OpenVMS to Linux and UNIX migration services.

Can VX/RDML target PostgreSQL and Oracle?

Yes. VX/RDML emits dialect-appropriate SQL — for example CONNECT / LIMIT / RETURNING ctid for PostgreSQL, and Oracle-specific forms such as ROWID and FETCH FIRST n ROWS ONLY where required.

Organisations leaving Oracle Rdb can also review the Rdb to Oracle/PostgreSQL toolset bundle and related tools such as VX/SQL-COBOL for embedded SQL in COBOL.

How does VX/RDML translate FOR loops and DML verbs?

An RDML FOR … END_FOR over a record selection expression (RSE) becomes a synthesised cursor: DECLARE CURSOR, OPEN, repeated FETCH, and CLOSE. GET items inside the loop are folded into the cursor’s FETCH INTO list.

STORE maps to INSERT, MODIFY to UPDATE … WHERE CURRENT OF, and ERASE to DELETE … WHERE CURRENT OF. Transaction verbs (START_TRANSACTION, COMMIT, ROLLBACK) map to standard SQL transaction statements.

Which RDML constructs have no direct SQL equivalent?

Some RDML features are recognised but preserved as comments with warnings — for example segmented-string FOR loops, INVOKE of external Rdb modules, BATCH_UPDATE transactions, and some WAIT/NOWAIT semantics. VX/RDML writes details to a .rdml.warnings.txt sidecar file.

With --strict, the converter exits non-zero when unsupported constructs are encountered. Contact Sector7 to review a representative source sample before production migration.

Message Us
Email us with your queries and a team member will get back to you ASAP.
Call Us
Want to chat? Give us a call and we’ll answer all your questions.
Location
Prefer to visit? Sector7 is based in Austin, Texas.

Transform Your Legacy Software Today!

Get In Touch
Unlock the potential of your legacy software with our expert migration services.