SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
15-37
c89 Utility: Using One Command for All Compilation
Steps
In addition to the options for preprocessing and compiling SQL/MX components, the
c89 utility supplies SQL/MX environment variables that provide the path name for the
SQL/MX preprocessor (MXSQLC) and the SQL/MX compiler (MXCMP and
MXCMPUM). For more information on c89 environment variables, see the Open
System Services Shell and Utilities Reference Manual.
SQL/MX Preprocessing
Use the -Wsqlmx[=args] command to invoke the SQL/MX preprocessor. When
-Wsqlmx is specified, the c89 utility also searches /usr/tandem/sqlmx/include
for header files for the C/C++ compilers. For a full description of how the OSS-hosted
SQL/MX preprocessor works, see OSS-Hosted SQL/MX C/C++ Preprocessor on
page 15-15.
Compiling C/C++ Statements
Use the c89 utility to compile the C/C++ statements in a preprocessed file to create an
object (.o) file. The c89 utility determines which compiler to use based on the file
extension you use (.ec or .sql for embedded SQL/MX C programs, .ecpp for
-WmoduleVersion[=[string]] Allows multiple versions of an application’s
module files to coexist while keeping the
same MODULE directive in each version. For
more information, see Versioning on
page 17-19.
-Wsqlmx_pp_defscript=args Specifies the files that contain the class MAP
DEFINEs that create environment variables
before SQL/MX preprocessing.
-Wmxcmp_cmd="oss_command;
oss_command"
Specifies the list of OSS commands to
execute before invoking the remote mxcmp.
-Wsqlhost={hostname | IP-
address}
Specifies the host name or IP address of the
NonStop system where the tables specified by
INVOKE reside. This option is required if you
use INVOKE.
-Wsqlloc=OSS-directory Specifies the directory in which module
definition files are placed.
-Wsqlmx_port=port-number Specifies the TCP/IP port of the NonStop
system to connect to for the ODBC listener
process. The default port for the Association
server is 18650.
-Wsqluser=user[,password] Specifies the Guardian user name and
password with access to the tables that
INVOKE reads. Required if you use INVOKE.
The PC-only options are shaded in gray.