SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
CPUs to simultaneously access each of the subsets in far less time than it would take to run a single
DISPLAY USE OF operation on the modules.
This subsection provides instructions and examples for precompiling embedded applications to
generate different modules using the module grouping precompiler option. It contains examples
of these activities:
• Using the module grouping precompiler option to precompile embedded C applications to
generate different modules
• Using DISPLAY USE OF to search for SQL/MX objects used by specified modules
• Using mxCompileUserModule to place SQL compiled modules in the user specified local
directory
• Using DISPLAY USE OF to search for compiled modules by specifying an SQL/MX object
Assume you have five applications written in C and want to group these applications and their
modules into these two groups:
• t01.sql, t02.sql, and t03.sql into the group INVENTORYAPP
• t11.sql and t21.sql into the group SHIPMENTAPP
The INVENTORYAPP applications access the SQL/MX table T01CAT.T01SCH.T01TBL. The
SHIPMENTAPP applications access the SQL/MX table T01CAT.T01SCH.T02TBL.
1. Precompile the applications to the group INVENTORYAPP:
/user/smith/tmp/tmp/DUO: mxsqlc t01.sql -g moduleGroup=INVENTORYAPP
Hewlett-Packard NonStop(TM) SQL/MX C/C++ Preprocessor 3.0
(c) Copyright 2003, 2004-2010 Hewlett-Packard Development Company, LP.
----- End of File Processing Checks -----
0 errors, 0 warnings in SQL C file
"/user/smith/tmp/tmp/DUO/t01.sql"
2. Repeat Step 1 for t02.sql and t03.sql:
% mxsqlc t02.sql -g moduleGroup=INVENTORYAPP
% mxsqlc t03.sql -g moduleGroup=INVENTORYAPP
3. Process the applications to generate annotated application executables, referring to the
SQL/MX Programming Manual for C and COBOL for details. The annotated executables
should look like this after the C preprocessor, compiler, and linker have run:
t01.sql -> t01.exe
t02.sql -> t02.exe
t03.sql -> t03.exe
t11.sql -> t11.exe
t21.sql -> t21.exe
4. SQL compile the annotated applications using mxCompileUserModule. In this example, SQL
compiled modules are placed in the /usr/tandem/sqlmx/USERMODULES directory. Also,
the SQL compiled module name contains the module string that was used.
/user/smith/tmp/tmp/DUO: mxCompileUserModule t01.exe
/G/system/system/mxcmp /tmp/aaaRGadYa66447AGJBBB
Hewlett-Packard NonStop(TM) SQL/MX Embedded Module Compile Utility 3.0
(c) Copyright 2003, 2004-2010 Hewlett-Packard Development
Company, LP.
/tmp/aaaRGadYa66447AGJBBB
(/usr/tandem/sqlmx/USERMODULES/T01CAT.T01SCH.INVENTORYAPP^T01 MOD^^)
0 errors, 0 warnings, 0 statements affected; 9 statements
total
Managing Modules 229










