Technical Capabilities
Having trouble finding what you need?
Get in touch with us, so we can answer your specific questions directly.
Get In Touch

VX/C - OpenVMS C to ANSI C

Overview

VX/Cpp is Sector7’s automated tool for converting VMS / OpenVMS C source code into portable, POSIX-compliant ANSI C. It identifies, flags, and corrects VMS-specific issues, ensuring the generated code is optimized for Linux and Windows.

Fully automated source code conversion

POSIX-compliant ANSI C output

Detects & fixes VMS-specific syntax and dependencies

Works with existing Makefiles & build systems

Supports VMS-specific #include handling & macros

VX/Cpp Operation

VX/Cpp functions similarly to a C compiler. It parses C source files and generates formatted reports, fix scripts, and POSIX-compliant source code.

Command Line Usage

VX/Cpp follows a standard compilation-like invocation:

vxcpp [switch_list] file_name [, file_name_list]


• switch_list: A list of switches, prefixed by -, to control VX/Cpp’s behavior.

• file_name: The C source file(s) to process.

VX/Cpp also provides configuration file support for setting default options.

VX/Cpp Features

VX/Cpp identifies and resolves key VMS / OpenVMS C issues, such as:

Feature Code Issue Identified
01.01Addressing constants (numbers)
01.02Addressing strings
03.01Variant struct/union usage
04.01Assigning unions to unions
05.01#include from a text library without quotes/angles
05.02Logical name #include references
05.04Case sensitivity in #include paths
06.01Missing function arguments
08.02Type mismatches
09.01Inconsistent function naming cases
10.02Use of VMS-specific compiler calls (e.g., vax$errno)
10.04Incompatible POSIX type usage (stderr, etc.)
16.01Undefined return types
19.01Typecasting on the left-hand side of assignments
Example Fixes

VX/Cpp automatically corrects issues and generates a SED script for easy integration.

Fixing Missing Arguments

VMS / OpenVMS C

lib$set_logical(prim_log(1:12), primary_file);


Migrated ANSI C

lib$set_logical(prim_log(1:12), primary_file, 0, 0, 0);
Fixing Function Prototypes

VMS / OpenVMS C

int exampleFunction(); // No argument specification


Migrated ANSI C

int exampleFunction(void);

Configuration & Output

VX/Cpp provides three types of output:

1. Formatted Reports (stderr output)

2. Database Files (tab-separated logs)

3. SED Scripts (automated code fixes)

Sample Report Output
testx1.c:7: display 08.04 integer used as pointer
testx1.c:17: display 08.02 Multiple character constant
testx1.c:26: fix 16.02 Mismatched return type
testx1.c:57: replace atest with int atest
Applying Fixes Using SED

To apply automated fixes:

sed -f testx1.c.sed testx1.c > new_testx1.c

Why Choose VX/Cpp?

Fully automated, reducing manual migration time

Ensures consistent code output

Supports continuous integration workflows

Proven in high-complexity migrations

VX/Cpp simplifies the transition from VMS / OpenVMS to ANSI C, ensuring seamless portability across Linux and Windows environments.

Transform Your Legacy Software Today!

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