SQL/MX 3.2 Programming Manual for C and COBOL (H06.25+, J06.14+)

C/C++ Program Compilation
HP NonStop SQL/MX Release 3.2 Programming Manual for C and COBOL663854-002
15-48
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-19.
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
embedded SQL/MX C++ programs, and .c for embedded SQL/MP C programs). For a
list of file extensions for SQL/MX source files, see Program Files
on page 17-1.
Your application program can run in the OSS or Guardian environment. Use the c89
-Wsystype=oss option (which is the default) if you want your application to be an
OSS program. Use the c89 -Wsystype=guardian option if you want your
application to be a Guardian program. For more information, see Building SQL/MX
Guardian Applications in the OSS Environment on page 15-72.
SQL/MX Compiling
Use the -Wmxcmp[=args] command to invoke the SQL/MX compiler. For a full
description of how to use the SQL/MX compiler, see Running the SQL/MX Compiler on
page 15-36.
-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.