SQL/MX Programming Manual for Java
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-1
5 Processing SQLJ Programs
This section explains how to prepare an SQLJ program for execution and assumes
that you have already written the source code of an SQLJ program. For information
about how to write SQLJ source code, see Section 3, SQLJ Programming and
Section 4, SQL/MX Programming Considerations.
This section covers these topics:
•
Commands for Processing an SQLJ Program on page 5-1
•
Using Command-Line Options on page 5-6
•
SQLJ Translator Command Line on page 5-10
•
Java Compiler Command Line on page 5-33
•
mxCompileUserModule Command Line on page 5-34
•
SQL/MX Compiler Command Line on page 5-38
•
jar Tool Command Line on page 5-40
•
SQLJ Run-Time Command Line on page 5-41
•
ProfilePrinter Tool on page 5-42
•
Displaying Query Execution Plans on page 5-46
Commands for Processing an SQLJ Program
There are two methods of processing an SQLJ program, each which has its own set of
commands:
•
Commands for Processing Without Module Definition Files on page 5-2
•
Commands for Processing With Module Definition Files on page 5-4
The first method is the default method of processing an SQLJ program in SQL/MX
Release 2.x. This processing method embeds a module definition in the extended
profile rather than generating a module definition file. After translating and customizing
the program, you must initiate SQL compilation in a separate step by invoking the
mxCompileUserModule utility. This approach of SQL compiling separately from
translating and customizing is useful for building JAR files of applications and
deploying them in production.
The second method is the only method of processing an SQLJ program in SQL/MX
Release 1.8 and can be activated in SQL/MX Release 2.x by using the -createMDF
option on the command line or in a properties file. This processing method performs
translation, customization, and SQL compilation all in one command, which is useful
for small test builds when you build and test the program in one place, such as on a
development system.
The next subsections describe the commands to use for each processing method.