Description:
VX/MSG is a VMS/OpenVMS message file compiler that translates message definitions (.msg) into an indexed memory file on Linux and Windows, ensuring full compatibility with SYS$ API calls such as SYS$GETMSG, SYS$FAO, and SYS$FAOL. Additionally, VX/MSG generates 3GL message constants for multiple programming languages, including C, C++, BASIC, Fortran, COBOL, and PASCAL.
By providing a structured message database that mirrors VMS/OpenVMS message handling, VX/MSG enables seamless application migration while preserving original messaging functionality.
Key Features of VX/MSG
• Compiles VMS/OpenVMS message files (.msg) into indexed binary files (.dat and .idx).
• Generates message constants for C, C++, Fortran, COBOL, BASIC, and Pascal.
• Provides full compatibility with VMS SYS$ API calls for message retrieval.
• Supports message display via VX/DCL, allowing messages to be viewed similarly to VMS.
• Enables seamless integration into Linux-based VMS/OpenVMS application builds.
Generating Message Constants
VX/MSG provides built-in support for multiple programming languages, allowing messages to be accessed via language-specific constants. The following commands illustrate how message constants are generated:
Generating Fortran Message Constants
msg -f < messages.msg > constants.f
Example Output:
VX/MSG - VMS Message Compiler for Linux (v8.5.2)
Copyright (C) 1987-2016 Sector7 USA LLC. All Rights Reserved.
Language Selected: Fortran
Generating C Message Constants
msg -c < messages.msg > constants.c
Example Output:
VX/MSG - VMS Message Compiler for Linux (v8.5.2)
Copyright (C) 1987-2016 Sector7 USA LLC. All Rights Reserved.
Language Selected: C/C++
Generating C Header Files
msg -h < messages.msg > constants.h
Example Output:
VX/MSG - VMS Message Compiler for Linux (v8.5.2)
Copyright (C) 1987-2016 Sector7 USA LLC. All Rights Reserved.
Language Selected: C/C++ Headers
These generated constant files allow application developers to reference predefined message IDs and text strings directly within their code.
VX/MSG Indexed Message File Structure
VX/MSG creates an indexed file format (.dat and .idx), ensuring messages are efficiently stored and retrieved. This structure mirrors the VMS SYS$MESSAGE system, allowing seamless message handling in Linux and Windows environments.
Example: Viewing the Messages File
On VMS/OpenVMS, messages are traditionally stored in SYS$MESSAGE:
$ show log sys$message
"SYS$MESSAGE" = "SYS$SYSROOT:[message]"
With VX/MSG, the messages are stored in indexed files:
$ type/page sys$message:messages.sys
This command allows users to view message definitions, just like in a VMS environment.
Example: Indexed File Listing
$ ls -l $VXREL/message
total 1144
-rw-rw-r-- 1 JDOE s7dev 16 Mar 8 21:33 messages.sys.dat -> MESSAGES.SYS.dat
-rw-rw-r-- 1 JDOE s7dev 1105585 Mar 8 21:33 MESSAGES.SYS.dat
-rw-rw-r-- 1 JDOE s7dev 16 Mar 8 21:33 messages.sys.idx -> MESSAGES.SYS.idx
-rw-rw-r-- 1 JDOE s7dev 65536 Mar 8 21:33 MESSAGES.SYS.idx
These files contain binary message data along with indexing information for fast retrieval.
VX/MSG in Application Build Processes
VX/MSG integrates into Linux and Windows build environments, ensuring messages are correctly compiled and deployed. For example, in a makefile, the following command populates the standard messages file:
$(VXREL)/message/MESSAGES.SYS.dat: $(BINDIR)/msg
@$(BINDIR)/msg < messages.msg
This approach ensures that applications using VX/MSG maintain their message-handling functionality without modification.
Example: Retrieving Messages in VX/DCL
VX/MSG allows messages to be retrieved and displayed using VX/DCL, similar to how messages are handled in VMS/OpenVMS.
Retrieving Messages via VX/DCL
$ type/page sys$message:messages.sys
This command outputs message definitions, allowing developers to verify message contents directly within the VX/RT environment.
Conclusion
VX/MSG provides a seamless, high-performance migration path for VMS/OpenVMS message systems to Linux and Windows. By compiling VMS message files into an indexed structure and generating message constants for multiple languages, VX/MSG ensures that applications retain their original message-handling capabilities.
For teams migrating VMS applications, VX/MSG simplifies the process, ensuring full SYS$ API compatibility, efficient message storage, and minimal code modifications.