SQL/MX Programming Manual for Java
Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-2
Commands for Processing Without Module
Definition Files
Commands for Processing Without Module Definition Files
The SQLJ translator program, sqlj.tools.Sqlj, is a Java program that 
automatically invokes translation, Java compilation, and customization of an SQLJ 
program, depending on the options that you pass to it. See the SQLJ Translator 
Command Line on page 5-10 and Using Command-Line Options on page 5-6.
By default, the processing of an SQLJ source file follows these steps when you run the 
SQLJ translator program:
1. Translation. See Command for Translation on page 5-2.
2. Java compilation. See Commands for Java Compilation on page 5-2.
3. Customization. See Command for Customization on page 5-3.
For a diagram of these steps, see Figure 1-1 on page 1-10.
To invoke SQL compilation, you must run the mxCompileUserModule utility after you 
run the SQLJ translator program, sqlj.tools.Sqlj. For more information, see 
Command for SQL Compilation by mxCompileUserModule on page 5-3. 
Command for Translation
If you specify a .sqlj file (SQLJ source file) on the SQLJ command line, 
sqlj.tools.Sqlj by default invokes translation, Java compilation, and 
customization of the SQLJ program. For example, issue this OSS command to initiate 
translation:
java sqlj.tools.Sqlj MyProg.sqlj 
You can disable customization with the -profile option and disable Java compilation 
with the -compile option. 
For more information, see Translation on page 1-11 and Options for the SQLJ 
Translator on page 5-21. 
Commands for Java Compilation
If you specify a .java file (Java source file) on the SQLJ command line, 
sqlj.tools.Sqlj performs Java compilation on the file. For example, issue this 
OSS command to initiate Java compilation:
java sqlj.tools.Sqlj MyProg.java 
For more information, see Compilation by the Java Compiler on page 1-12 and Options 
for the Java Compiler on page 5-24.
Caution. If you do not run mxCompileUserModule, you will not generate module files, and 
the program will either run dynamically or return an SQL exception indicating that the module is 
missing or corrupted. For more information, see SQL/MX Compiler Errors
 on page 4-5. 
Note. It is faster to translate multiple source files simultaneously rather than translating 
individual source files one at a time.










