SQL/MX Programming Manual for Java
Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-38
SQL/MX Compiler Command Line
SQL/MX Compiler Command Line
The SQLJ translator program automatically invokes the SQL/MX compiler and 
produces a module if you choose to customize a program and if you choose to 
generate a module definition file (.m) by specifying the -createMDF=true (or 
-SQLMXCustomizerVersion=800) option. The SQL/MX compiler SQL compiles the 
embedded SQL statements in the module definition file. For more information, see 
Compilation by the SQL/MX Compiler (MXCMP) on page 1-19.
You can also invoke the SQL/MX compiler independently of the SQLJ translator 
program by running the mxcmp command. The SQL/MX compiler (MXCMP) is installed 
in the Guardian $SYSTEM.SYSTEM subvolume, or /G/system/system in the OSS 
environment, but you must run the SQL/MX compiler in the OSS environment.
Command-Line Syntax
To invoke the SQL/MX compiler, enter this command at an OSS prompt: 
-e 
causes mxcmp to generate a warning rather than an error if a table or DEFINE in 
an SQL statement does not exist during explicit SQL compilation. To find errors in 
a program during explicit SQL compilation, omit the -e option.
By default, customization requires database objects to exist at the time the 
program is customized. To use a table or DEFINE that does not exist at the time of 
customization, you must set the -missingSQLObject option to true, which 
results in no entries for those SQL statements in the module definition file. If SQL 
statements have entries in the module definition file, they should refer to existing 
database objects during SQL compilation. Therefore, avoid using the -e option 
when running MXCMP. Otherwise, SQL compilation occurs with warnings when a 
referenced database object cannot be found. 
-v 
causes mxcmp to display summary information in addition to error and warning 
messages for the compilation. 
-g moduleGlobal
specifies that the module be placed globally in the /usr/tandem/sqlmx/
USERMODULES
 directory. Use this option to generate modules for an SQLJ 
program when the MXCMP_PLACES_LOCAL_MODULES attribute is ON in the 
SYSTEM_DEFAULTS table. If you do not specify this option when 
mxcmp [-e] [-v]
[-g moduleGlobal]
[-d 
compiler-attribute-name=compiler-attribute-value]...
module-definition-file 










