Description:
VX/SQL-COBOL (part of Sector7's Vx/SQLCC toolset) is a post-processor for COBOL applications containing embedded Oracle Rdb SQL. It enables legacy COBOL applications to run against PostgreSQL or Oracle on x86 OpenVMS, Itanium, and Linux — without rewriting the COBOL source code.
Vx/SQLCC supports two operational modes: in situ execution, where embedded SQL runs within COBOL as a single compile step, and one-time SQL extraction, where SQL is separated into external C/C++ modules for long-term maintainability. Both modes include automatic conversion of OpenVMS-specific data types including PACKED DECIMAL and QUADWORD datetime.
The Problem — Why COBOL Embedded SQL Is Stuck
Oracle Rdb End of Life on OpenVMS
Oracle has announced that Oracle Rdb will not be ported to x86 OpenVMS, with end-of-life scheduled for December 2027 across all platforms. The classic Oracle client — which provided embedded SQL support for COBOL — will also not be ported to x86 OpenVMS. This leaves PostgreSQL as the only global enterprise database client available on both x86 OpenVMS and Itanium OpenVMS.
PostgreSQL Only Handles SQL in C and C++
The PostgreSQL ECPG preprocessor processes embedded SQL in C and C++ only. It cannot handle embedded SQL in COBOL or FORTRAN. For any COBOL application with embedded Rdb SQL, there is currently no standard migration path to PostgreSQL without manual rewriting of the entire application.
• Organisations with millions of lines of COBOL containing embedded Rdb SQL have no supported database path on x86 OpenVMS without the Sector7 converter.
• There is no COBOL preprocessor available for ECPG. Vx/SQLCC is the only production-ready solution.
Unsupported Legacy Data Types
PostgreSQL does not natively support the data types used extensively in OpenVMS COBOL applications:
• PACKED DECIMAL — used for compact numeric storage in COBOL
• QUADWORD datetime — the OpenVMS/Rdb date and time format
The classic Oracle client also does not support these formats, which means both migration paths — to Oracle and to PostgreSQL — require data type conversion. Vx/SQLCC handles this automatically.
Rdb Record-Oriented Access
Oracle Rdb applications frequently rely on record-based cursor access patterns that are not directly compatible with PostgreSQL's relational model. Without specialist handling, migration causes significant performance degradation. Vx/SQLCC includes proprietary technology specifically designed to preserve performance.
How Vx/SQLCC Works for COBOL
Two Operational Modes
In situ (single compile step)
Embedded SQL remains within the COBOL source. Vx/SQLCC processes the source as part of the compile step, running the SQL against PostgreSQL with minimal disruption to application structure. The fastest migration path.
One-time SQL extraction
Embedded SQL is extracted from COBOL into external C/C++ modules. All host variable bindings are generated automatically, including full data type conversion logic. Future SQL changes are maintained in the external C/C++ module — separating database access from COBOL logic for long-term maintainability.
Automatic Data Type Conversion
Both modes include transparent handling of OpenVMS legacy data types:
• PACKED DECIMAL → ANSI NUMERIC on input; ANSI NUMERIC → PACKED DECIMAL on output
• QUADWORD datetime → SQL datetime on input; SQL datetime → QUADWORD on output
These conversions are fully automated — no manual intervention required in the COBOL source.
Host Variable Bindings and Return Codes
• Host variable bindings are preserved across the COBOL/C boundary. Parameter passing linkage is generated automatically.
• Return codes are automatically converted to Rdb-compatible equivalents, ensuring existing COBOL error-handling logic continues to function.
Rdb Cursor Fetch Optimisation
Vx/SQLCC incorporates Sector7's proprietary technology for accelerating legacy Rdb cursor fetch loops when running against PostgreSQL. Applications relying on record-based access patterns achieve equal or better performance compared to native Rdb — without changes to the COBOL source.
File Generation — One-Time Extraction Mode
Output Files
For the one-time extraction mode, Vx/SQLCC reads the COBOL source containing embedded SQL and generates the following files:
Compilation and Linking Process
1. Updated .COB and .CPY are compiled by the COBOL compiler, generating an object file (.o).
2. The .pc / .pgc SQL module is processed by the Oracle Pro*C precompiler or ECPG preprocessor, generating a C source file (.c).
3. The C file is compiled using GNU C, generating a second object file (.o).
4. Both object files are linked to create the final executable, which interacts with Oracle or PostgreSQL directly.
Platform Support
OpenVMS x86 — PostgreSQL
Full Vx/SQLCC support on x86 OpenVMS. Both in situ and one-time extraction modes are available. PostgreSQL is the only available enterprise database client; Vx/SQLCC bridges the COBOL embedded SQL gap that no other tool addresses.
OpenVMS Itanium — Oracle Client
On Itanium OpenVMS, the Oracle client 11g (connecting to Oracle 19c) remains available. Vx/SQLCC supports this path, including all data type conversion and cursor fetch optimisation capabilities.
Linux — PostgreSQL or Oracle
Vx/SQLCC is not limited to OpenVMS. On Linux it enables legacy COBOL applications to run with PostgreSQL using Fujitsu NetCOBOL or OpenCOBOL / GnuCOBOL — environments where no COBOL ECPG preprocessor exists. For Oracle on Linux, Vx/SQLCC can generate C/C++ modules as an alternative to the Oracle COBOL preprocessor.
SQLMOD and CDD Conversion
Vx/SQLCC also processes Oracle Rdb SQLMOD files:
• Converts Rdb SQLMOD procedures to C/C++ with proprietary record-access optimisation
• Supports single-use mode (SQL maintained in C/C++) and multiple-use mode (SQL maintained in SQLMOD)
• Auto-generates test harnesses for all procedures in a SQLMOD
CDD conversion: Converts CDD to COBOL copybooks and C include files with automatic schema conversion — QUADWORD → TIMESTAMP and PACKED DECIMAL → NUMERIC. Note: CDD will not be ported to x86 OpenVMS; VSI provides VDD as a drop-in replacement, which integrates with the Vx/SQLCC workflow.
Key Benefits of Vx/SQLCC for COBOL
1. No COBOL Rewrite Required
• Existing COBOL applications run against PostgreSQL or Oracle without source rewriting.
• Choice of in situ (minimal disruption) or extraction (long-term maintainability) — both preserve original application logic.
2. Automatic Data Type Conversion
• PACKED DECIMAL and QUADWORD datetime handled transparently on both input and output.
• No manual conversion code required in COBOL or C.
3. Performance Preserved
• Sector7's proprietary cursor fetch optimisation ensures legacy record-based access patterns perform as well or better under PostgreSQL as under native Rdb.
4. Dual Database Target
• Oracle Pro*C output (.pc) for organisations on Oracle on Linux or OpenVMS Itanium.
• PostgreSQL ECPG output (.pgc) for organisations migrating to open-source PostgreSQL.
5. Cross-Platform
• Runs on x86 OpenVMS, Itanium OpenVMS, and Linux.
• Linux support covers Fujitsu NetCOBOL and OpenCOBOL/GnuCOBOL environments.
Conclusion
With Oracle Rdb reaching end-of-life and the classic Oracle client not being ported to x86 OpenVMS, organisations running COBOL applications with embedded SQL face a hard deadline with no standard migration path. Vx/SQLCC is the solution — automating SQL conversion, handling data type translation, preserving performance, and working across OpenVMS x86, Itanium, and Linux.
For organisations planning an Oracle Rdb migration or moving to OpenVMS x86, Vx/SQLCC provides the missing link between legacy COBOL applications and modern PostgreSQL or Oracle infrastructure. Talk to Sector7 to discuss your migration requirements.
