SQL/MX Programming Manual for C and COBOL (H06.10+, J06.03+)

COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL544617-003
16-18
Windows-Hosted SQL/MX COBOL Preprocessor
Windows-Hosted SQL/MX COBOL Preprocessor
The Windows-hosted SQL/MX COBOL preprocessor is a DLL file named
mxsqlcont.dll and is accompanied by a DLL loader named mxsqlco.exe. These
files are installed in the C:\Program Files\HP SQL-MX COBOL Preprocessors
directory. Use either the command shell or the Korn shell to run the preprocessor with
the RUN command.
You can install multiple versions of the SQL/MX COBOL preprocessors. The
environment variable MXSQLCO enables you to select a particular version of the
SQL/MX COBOL preprocessor for COBOL compilations.
For example, to select the SQL/MX COBOL preprocessor in the
C:\PROGRA~1\HPSQL-~2\ directory, set MXSQLCO from the Windows command line:
set MXSQLCO=C:\PROGRA~1\HPSQL-~2\mxsqlcont.dll
You can also set the environment variable in the Windows system properties. If
multiple versions of the SQL/MX COBOL preprocessors are installed and if MXSQLCO
is not set, the latest version of the SQL/MX COBOL preprocessor installed on the
system is used for compilations, by default.
If you use INVOKE, MXCS must be installed on your operating system to provide the
necessary communication between your client workstation and the server. For more
information on how to install MXCS, see the SQL/MX Connectivity Service
Administrative Command Reference. In addition, you must install the HP NonStop
ODBC/MX driver for Windows. For installation information, see the ODBC/MX Driver
for Windows Manual.
The SQL/MX COBOL preprocessor 2.3 can be invoked by a user or by a cross
compiler, or by an IDE. For each scenario, the SQL preprocessor invoked is:
A user calls the SQL preprocessor to preprocess a source program. The SQL
preprocessor uses the header files and libraries from the SQL preprocessor
installation directory.
The SQL preprocessor is invoked by the nmcobol.exe/ecobol.exe compiler.
The compiler uses the SQL preprocessor version defined by MXSQLCO. The SQL
preprocessor uses the libraries and header files related to that version.
If MXSQLCO is not set, the cross compiler invokes the latest version of the SQL/MX
COBOL preprocessor installed on the system.
An IDE is used. The IDE invokes c89, which uses MXSQLCO to select an alternative
version. Some of the IDEs are:
°
Enterprise Tool Kit (ETK)—plug-in for Microsoft Visual studio
Note. On systems running H06.14 RVU and later, the SQL/MX COBOL compilations select
the latest version of the SQL/MX COBOL preprocessors installed on the system.
On systems running H06.13 RVU and earlier, the SQL/MX COBOL compilations use the
earliest version of the SQL/MX COBOL preprocessor installed on the system.