Building Mimer Applications on OpenVMS
There are three native API’s provided in the Mimer distribution. Each API has a shared library and an options file (.OPT) for linking. There is also a logical name for each shared library, defined by the SYS$MANAGER:MIMER$SETUP_xxxxx.COM procedure:
Logical name |
Points to |
Used by |
---|---|---|
MIMER$API |
SYS$SHARE:MIMER$API_xxxxx |
MIMER$LIB:MIMER$API.OPT |
MIMER$ODBC |
SYS$SHARE:MIMER$ODBC_xxxxx |
MIMER$LIB:MIMER$ODBC.OPT |
MIMER$SQL |
SYS$SHARE:MIMER$SQL_xxxxx |
MIMER$LIB:MIMER$SQL.OPT |
The options file directs the linker to use the logical name to find the shareable image. For example, MIMER$LIB:MIMER$SQL.OPT contains:
MIMER$SQL/SHARE
If you link your application with this options file, the resulting program will contain a reference to the shared library named MIMER$SQL (without a version suffix), as shown by the following example:
$ LINK EXAMPLE,MIMER$LIB:MIMER$SQL/OPT
$ ANALYZE/IMAGE/OUT=X.TMP EXAMPLE
$ SEA X.TMP "SHAREABLE IMAGE LIST" /WIN=(0,10)
Shareable Image List
MIMER$SQL
(LESS/EQUAL, 11., 1105.)
DECC$SHR
LESS/EQUAL, 1., 1.)
If you try to run this program without a definition of the logical name MIMER$SQL, the shareable image will not be found.
$ RUN EXAMPLE
%DCL-W-ACTIMAGE, error activating image MIMER$SQL
-CLI-E-IMAGEFNF, image file not found SIV$DKA100:[SYS0.SYSCOMMON.][SYSLIB]MIMER$SQL.EXE;
Use SYS$MANAGER:MIMER$SETUP_xxxxx.COM to select the Mimer version to use, which defines the required logical names.
$ @SYS$MANAGER:MIMER$SETUP_1108E
$ SHOW LOG MIMER$SQL
"MIMER$SQL" = "SYS$SHARE:MIMER$SQL_1108E.EXE" (LNM$PROCESS_TABLE)
$ RUN EXAMPLE
INFORMATION_SCHEMA ASSERTIONS VIEW
INFORMATION_SCHEMA ATTRIBUTES VIEW
INFORMATION_SCHEMA CHARACTER_SETS VIEW
INFORMATION_SCHEMA CHECK_CONSTRAINTS VIEW
...
Since EXAMPLE.EXE is linked to a logical name, the SYS$MANAGER:MIMER$SETUP_xxxxx.COM procedure will set the version of the Mimer libraries the program uses, without having to re-link.
The directory MIMER$EXAMPLES contains numerous example programs you can build on OpenVMS. Please read the supplied .TXT files for more information.
$ DIR MIMER$EXAMPLES:*.TXT
Directory SYS$COMMON:[MIMER1108E.EXAMPLES]
README_ESQL.TXT;1 README_MIMERAPI.TXT;1 README_MSQL.TXT;1