VX/RT OpenVMS API's on Linux and UNIX - OpenVMS Migration


VX/RT is a library of call and functionality compatible API's written in native C and C++for Linux and UNIX.

All VX/RT API's take the identical arguments as OpenVMS and also take the same OpenVMS argument formats.

For example, API's that take an OpenVMS file specification on OpenVMS take exactly the same file specification on Linux and UNIX and VX/RT converts at runtime the OpenVMS LOGICALS, LOGICAL SEARCH LISTS and VMS FILESPECIFICATIONS including VERSIONING.

The design philosophy is that the OpenVMS applications do not need to be changed to call the same API's and get the same functionality on Linux and UNIX.

NOTE: API calls to DEC FORMS, ACMS, DecMessageQ and RTR are missing from the list below. Click on the links to see the VX/RT API's for those products. VX/RT is a collection of libraries written by Sector7 that provides the equivalent VMS API functionality on the target Linux/UNIX. In order for VX/RT to function, the following toolkits must also be installed: VX/DCL , VX/RMS. More than 900 of the most commonly used OpenVMS API's have been faithfully reproduced with the identical names, arguments, return code and functionality. The VX/RT (and other libraries) link into the application to provide the functionality the VMS application requires to perform the application intended task.

The technical issues of migrating VMS applications from VMS to Linux/UNIX can be summarized in three ways; Language differences; Data Files (RMS, RDB) VMS library calls.

The language differences can be solved using a mixture of native compilers and language translators. The data files can be moved from the VMS system to the target environment and the data formats translated into a form usable on the target environment (see VX/DATAX).

Once the VMS specific language extensions and behaviors have been resolved the program can be compiled to object form ready for linking with any external subprograms. Most VMS applications make calls to the VMS operating system to perform system tasks ( BAS$ , CLI$ , CONV$ , EDT$ , FDL$ , FDV$ , FOR$ , LBR$ , LIB$ , MTH$ , OTS$ , SOR$ , SMG$ , STR$ , and SYS$.) These VMS API's allow VMS applications to perform complex tasks without the programmer having to write the equivalent functions.

It is also these same API's that cause the greatest difficulty when moving those applications to an operating system that does not support the equivalent API's. Sector7 designed VX/RT to enable the application to be ported with the minimum number of code changes. To this end, the VX/RT API's accept VMS file specifications and return VMS return codes. For example SYS$OPEN takes a pointer to a FAB and would return RMS$_FNF (98964) if the file is not found. The FAB requires no changes and most of the fields are supported (obviously some field such as number of extents make no sense on some target systems).

Learn More

INTRODUCTION

VX/RT is a collection of over 900 OpenVMS system service calls for Linux and UNIX. All of the OpenVMS API's are written in native C and C++ for Linux and UNIX. They are call compatible, take the same arguments and return the same results. Even errors codes are mapped from Linux and UNIX errors code to OpenVMS error codes.  For example SYS$OPEN takes a pointer to a FAB and would return RMS$_FNF (98964) if the fine is not found. The FAB requires no changes and most of the fields are supported (obviously some field such as number of extents make no sense on some target systems).

RMS

Sector7 provides an ODBC interface to VX/RMS allowing concurrent data retrieval in a client server mode from Windows based systems and applications. VX/RMS is accessible from the standard SYS$ interface and provides full support for FAB, RAB, NAM and XABs. VX/RMS also includes a full FDL$ API set with the corresponding FDL command line programs (ANALYZE/RMS CONVERT/FDL).

VX/RT includes a number of user callable data conversion routines. The primary problem when moving data between VMS and other architectures is that the internal data representation is different, not only in byte ordering but also the default floating point format on most OPEN systems is IEEE488 and VMS is DFLOAT. Sector7 provides VX/DataX that will convert RMS data records to any machine architecture. Variable format records are handled by Sector7 data scripting language.

The OpenVMS API's to the RMS subsystem are OpenVMS compliant. Most take the form SYS$XXXX({Rdb/Fab}, AST Success, AST Error) FABDEF, RABDEF, NAMDEF, XAMDEF etc are the same structure as OpenVMS and the same definitions from STARLET can be used.

AST's, TIMERS, VMS DATE TIME

VX/RT V3.2 and above supports full OpenVMS AST's. AST generation and delivery performs exactly the same way as on OpenVMS. AST's supported: USER, SUPERVISER, EXECUTIVE and KERNEL mode. AST's generated from Asynchronous I/O, TIMERS, are delivered in the same way that they are delivered under OpenVMS. VX/RT supports OpenVMS timers, allowing multiple timers and SCHEDULE and CANCEL with AST delivery. OpenVMS DATE/TIME is fully supported in a QUADWORD based upon the number of microseconds since the MJD (Modified Julian Date) of Nov 17, 1858.

 

DCL

Most applications are invoked through a DCL script or call DCL from within the program to perform functions. VX/DCL is a complete DCL for open systems which allows both "standard" command line usage together with programmable API's callable from the user applications ( LIB$SPAWN, LIB$DO_COMMAND, LIB$GET_SYMBOL, LIB$GET_SYMBOL ).VX/DCL is responsible for the maintenance of the LOGICAL TABLES and the SYMBOL tables. Programs report completion status backs VX/DCL via IPC mechanisms. VX/DCL allows full VMS file specs to be used for operations and will execute "on the fly" conversion to the pen system specification. VX/DCL supports an interface to VX/JSP , which provides Batch and PRINT services through a VMS queue management system implemented on open systems.

COMMAND LINE INTERPRETER (CLI)

Many applications make use of the very powerful DEC COMMAND LINE INTERPRETER. Commands formats are created and the CLI will scan the input command line and apply the syntax rules programmed into the definition file (CLD). Sector7 provides VX/CLI , which combines a command line definition compiler and a command line interpreter.

 

PRINT AND BATCH QUEUES

VX/RT includes support for OpenVMS BATCH and PRINT Queue's. Over 100 DCL commands and modifiers which translate down to SYS$SNDJBC(W) and SYS$GETQUI(W) commands are implemented

LOGICALS & LOGICAL NAME TABLES

VX/RT supports a VMS compliant logical manager allowing user definable tables and logical inheritance classes for sub processes. User mode and kernel mode logical are supported and persistence rules adhered to. In addition to the standard logical management, Sector7 has extended the logical subsystem to allow logicals to be accessed and set from UNIX style API's All Sector7 language translators accept VMS file specs and logical names as input to file I/O routines. VX/RT supports th full range of logical name tables, logicals and logical search lists.

SYMBOLS

VXRT also supports OpenVMS symbols. Unlike UNIX environment variables, VX/RT symbols take via IPC to VX/DCL which stores the symbol values ensuring that symbols can be set in a program and retrieved in a different program or in the VX/DCL CLI.

 

MEMORY MANAGEMENT

OpenVMS memory management API's have been faithfully reproduced in the Sector7 library system. PAGED based allocation (VM_PAGE), ZONE based allocation (VM_ZONE) and GLOBAL PSECT ($CRMPSC etc) functionality is implemented. Certain restrictions apply to mapping global sections due to the memory architecture of the target systems, generally mapping of I/O ports to memory addresses is NOT supported. GLOBAL sections can be mapped into A UNIX/LINUX 3GL (C, C++, COBOL, BASIC, Fortran, PASCAL) to provide the same logical functions as on OpenVMS 3GL's.

EVENT FLAGS

Most VMS applications, especially those using asynchronous and inter-process communication I/O will use VMS event flags to synchronize code fragments. VMS event flags differ in many ways from UNIX or NT semaphores. Sector7 has implemented full VMS event flag functionality allowing the application to make full use of LOCAL and GLOBAL clustered event flags. All of the VMS APIs for controlling access to event flags are fully supported. Event flags are set on asynchronous and asynchronous operations.

 

 


VX/RT API's
BASIC
BAS$CVT_S_D
BAS$CVT_S_L
BAS$CVT_S_W
BAS$EDIT
BAS$SYSTEM
CLI
CLI$DCL_PARSE
CLI$DISPATCH
CLI$GET_VALUE
CLI$PRESENT
COB
COB$ACCEPT
COB$FILESCAN
COB$GETDVI
COB$GETDVIW
COB$GETJPI
COB$GETJPIW
COB$GETQUI
COB$GETQUIW
COB$GETSYI
COB$GETSYIW
COB$GETUAI
COB$GETUAIW
COB$SNDJBC
COB$SNDJBCW
COB$TRNLNM
CONV
CONV$CONVERT
CONV$PASS_FILES
CONV$PASS_OPTIONS
CONV$RECLAIM
EDT
EDT$EDIT
FDL
FDL$CREATE
FDL$GENERATE
FDL$PARSE
FDV$ADLVA
FDV$AFCX
FDV$AWKSP
FDV$CDISP
FDV$DEL
FDV$DISP
FDV$DTERM
FDV$DWKSP
FDV$FIX_SCREEN
FDV$GET
FDV$LCHAN
FDV$LCLOS
FDV$LEDOF
FDV$LEDON
FDV$LOPEN
FDV$PFT
FDV$PRINT_SCREEN
FDV$PUT
FDV$PUTL
FDV$PUTSC
FDV$READ
FDV$RET
FDV$RETCX
FDV$RETDI
FDV$RETFN
FDV$SPADA
FDV$STAT
FDV$TCHAN
FDV$USER_REFRESH
FDV$WAIT
FORMS$
FORMS$ENABLE
FORMS$SEND
FORMS$TRANSCIEVE
FORMS$REVEIVE
FORMS$DISABLE
LBR
LBR$CLOSE
LBR$DELETE_DATA
LBR$DELETE_KEY
LBR$FIND
LBR$FLUSH
LBR$GET_HEADER
LBR$GET_HELP
LBR$GET_HISTORY
LBR$GET_INDEX
LBR$GET_RECORD
LBR$INI_CONTROL
LBR$INSERT_KEY
LBR$LOOKUP_KEY
LBR$OPEN
LBR$OUTPUT_HELP
LBR$PUT_END
LBR$PUT_RECORD
LBR$REPLACE_KEY
LBR$SET_LOCATE
VX/RT API's
LBR$SET_MOVE
LIB
LIB$ADDX
LIB$ADD_TIMES
LIB$ANALYZE_SDESC
LIB$ATTACH
LIB$CALLG
LIB$CONVERT_DATE_STRING
LIB$CRC
LIB$CRC_TABLE
LIB$CREATE_DIR
LIB$CREATE_VM_ZONE
LIB$CVT_DTB
LIB$CVT_DX_DX
LIB$CVT_HTB
LIB$CVT_OTB
LIB$CVT_TO_INTERNAL_TIME
LIB$DATE_TIME
LIB$DAY
LIB$DAY_OF_WEEK
LIB$DELETE_FILE
LIB$DELETE_LOGICAL
LIB$DELETE_SYMBOL
LIB$DELETE_VM_ZONE
LIB$DIGIT_SEP
LIB$DISABLE_CTRL
LIB$DO_COMMAND
LIB$ENABLE_CTRL
LIB$ERASE_LINE
LIB$ERASE_PAGE
LIB$ESTABLISH
LIB$EXTV
LIB$EXTZV
LIB$FFC
LIB$FFS
LIB$FIND_FILE
LIB$FIND_FILE_END
LIB$FIND_IMAGE_SYMBOL
LIB$FORMAT_DATE_TIME
LIB$FREE_EF
LIB$FREE_LUN
LIB$FREE_TIMER
LIB$FREE_VM
LIB$GETDVI
LIB$GETJPI
LIB$GETSYI
LIB$GET_COMMON
LIB$GET_EF
LIB$GET_FOREIGN
LIB$GET_INPUT
LIB$GET_LOGICAL
LIB$GET_LUN
LIB$GET_SYMBOL
LIB$GET_VM
LIB$INDEX
LIB$INIT_DATE_TIME_CONTEXT
LIB$INIT_TIMER
LIB$INSERT_TREE
LIB$INSQHI
LIB$INSQTI
LIB$INSV
LIB$LEN
LIB$LOOKUP_TREE
LIB$MATCHC
LIB$MATCH_COND
LIB$MOVC
LIB$MOVC
LIB$MOVTC
LIB$PUT_BUFFER
LIB$PUT_COMMON
LIB$PUT_OUTPUT
LIB$PUT_SCREEN
LIB$RADIX_POINT
LIB$REMQHI
LIB$REMQTI
LIB$RENAME_FILE
LIB$REVERT
LIB$RUN_PROGRAM
LIB$SCANC
LIB$SCOPY_DXDX
LIB$SCREEN_INFO
LIB$SET_BUFFER
LIB$SET_CURSOR
LIB$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$DRAW_LINE
SMG$DRAW_RECTANGLE
SMG$END_DISPLAY_UPDATE
SMG$END_PASTEBOARD_UPDATE
SMG$ERASE_CHARS
SMG$ERASE_COLUMN
SMG$ERASE_DISPLAY
SMG$ERASE_LINE
SMG$ERASE_PASTEBOARD
SMG$FIND_CURSOR_DISPLAY
SMG$FLUSH_BUFFER
SMG$GET_BROADCAST_MESSAGE
SMG$GET_CHAR_AT_PHYSICAL_CURSOR
SMG$GET_DISPLAY_ATTR
SMG$GET_KEYBOATD_ATTRIBUTES
SMG$GET_PASTEBOARD_ATTRIBUTES
SMG$GET_PASTING_INFO
SMG$GET_TERM_DATA
SMG$GET_VIEWPORT_CHAR
SMG$HOME_CURSOR
SMG$INIT_TERM_TABLE
SMG$INIT_TERM_TABLE_BY_TYPE

VX/RT API's
SMG$INSERT_CHARS
SMG$INSERT_LINE
SMG$INVALIDATE_DISPLAY
SMG$KEYCODE_TO_NAME
SMG$KEYPAD_MODE
SMG$LABEL_BORDER
SMG$LIST_PASTING_ORDER
SMG$LOAD_VIRTUAL_DISPLAY
SMG$MOVE_TEXT
SMG$MOVE_VIRTUAL_DISPLAY
SMG$NAME_TO_KEYCODE
SMG$PASTE_VIRTUAL_DISPLAY
SMG$POP_VIRTUAL_DISPLAY
SMG$PRINT_PASTEBOARD
SMG$PUT_CHARS
SMG$PUT_CHARS_HIGHWIDE
SMG$PUT_CHARS_MULTI
SMG$PUT_CHARS_WIDE
SMG$PUT_LINE
SMG$PUT_LINE_HIGHWIDE
SMG$PUT_LINE_WIDE
SMG$PUT_PASTEBOARD
SMG$PUT_WITH_SCROLL
SMG$READ_FROM_DISPLAY
SMG$READ_KEYSTROKE
SMG$READ_STRING
SMG$REPAINT_LINE
SMG$REPAINT_SCREEN
SMG$REPASTE_VIRTUAL_DISPLAY
SMG$RESTORE_PHYSICAL_SCREEN
SMG$RETURN_CURSOR_POS
SMG$RING_BELL
SMG$SAVE_PHYSICAL_SCREEN
SMG$SAVE_VIRTUAL_DISPLAY
SMG$SCROLL_DISPLAY_AREA
SMG$SCROLL_VIEWPORT
SMG$SELECT_FROM_MENU
SMG$SET_BROADCAST_TRAPPING
SMG$SET_CURSOR_ABS
SMG$SET_CURSOR_MODE
SMG$SET_CURSOR_REL
SMG$SET_DISPLAY_SCROLL_REGION
SMG$SET_KEYPAD_MODE
SMG$SET_PHYSICAL_CURSOR
SMG$SET_TERM_CHARACTERISTICS
SMG$UNPASTE_VIRTUAL_DISPLAY
SOR
SOR$BEGIN_SORT
SOR$DTYPE
SOR$END_SORT
SOR$INIT_SORT
SOR$PASS_FILES
SOR$RELEASE_REC
SOR$RETURN_REC
SOR$SORT_MERGE
SOR$SPEC_FILE
SOR$STAT
STR
STR$ANALYZE_SDESC
STR$APPEND
STR$CASE_BLIND_COMPARE
STR$COMPARE
STR$COMPARE_EQL
STR$CONCAT
STR$COPY_DX
STR$COPY_R
STR$DUPL_CHAR
STR$ELEMENT
STR$FIND_FIRST_IN_SET
STR$FIND_FIRST_NOT_IN_SET
STR$FIND_FIRST_SUBSTRING
STR$FREE1_DX
STR$GET1_DX
STR$LEFT
STR$MATCH_WILD
STR$POSITION
STR$POS_EXTR
STR$PREFIX
STR$RIGHT
STR$TRIM
STR$UPCASE
SYS
SYS$ADD_HOLDER
SYS$ADD_IDENT
SYS$ADJSTK
SYS$ADJWSL
SYS$ALLOC
SYS$ASCEFC
VX/RT API's
SYS$ASCTIM
SYS$ASCTOID
SYS$ASSIGN
SYS$BINTIM
SYS$BRDCST
SYS$BRKTHRU
SYS$BRKTHRUW
SYS$CANCEL
SYS$CANEXH
SYS$CANTIM
SYS$CANWAK
SYS$CHANGE_ACL
SYS$CHANGE_CLASS
SYS$CHECK_ACCESS
SYS$CHKPRO
SYS$CLOSE
SYS$CLREF
SYS$CMEXEC
SYS$CMKRNL
SYS$CNTREG
SYS$CONNECT
SYS$CREATE
SYS$CREATE_RDB
SYS$CRELNM
SYS$CRELNT
SYS$CRELOG
SYS$CREMBX
SYS$CREPRC
SYS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