SQL/MX Programming Manual for Java
Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-22
Options for the SQLJ Translator
-encoding
The -encoding option specifies the input and output encoding of the Java source file.
You can specify the alias -e instead of -encoding on the command line. To assign a
value to -e, omit the = sign (for example, -eSJIS).
By default, the encoding is based on the file.encoding system property. The
file.encoding value in the OSS environment is ISO88591 by default.
The SQLJ translator program passes the -encoding value to the Java I/O routines
when it reads the SQLJ source file (.sqlj file) and writes the Java source file (.java
file). The SQLJ translator program also passes the value of this option to the Java
compiler, so the Java compiler reads the Java source file with the same encoding with
which the file was written.
SQLJ supports all the encoding sets supported by the NonStop Server for Java.
However, SQL/MX supports only these character sets in SQL columns that have
character string data types:
For more information about these characters sets, see the SQL/MX Reference Manual.
For example, this command sets the
-encoding option to UTF-16BE and directs the
SQLJ translator that the SQLJ source file is encoded with the UCS2 character set:
java sqlj.tools.Sqlj -encoding=UTF-16BE MyProg.sqlj
You cannot use the -C prefix with the -encoding option. For more information, see
Disallowed Java Compiler Options on page 5-25.
-profile
The -profile option controls the invocation of the SQLJ customizer. By default, the
SQLJ translator program invokes the customizer after successful translation. The same
result occurs when you set -profile to true on the command line. If you set
-profile to false on the command line, as this example shows, customization is
suppressed:
java sqlj.tools.Sqlj -profile=false MyProg.sqlj
Java Encoding Name SQL/MX Keyword Standard Character Set Name
ISO8859_1 ISO88591
(SQL/MP and
SQL/MX tables)
ISO-8859-1 or latin1
UTF-16BE (or
UnicodeBigUnmarked)
UCS2 (SQL/MX
tables only)
Unicode 2.1 or ISO/IEC 10646-1:1993
UCS-2
EUC_KR KSC5601
(SQL/MP tables
only)
KS_C_5601 (Korean)
SJIS KANJI (SQL/MP
tables only)
JIS X 0208:1997, Shift-JIS, or MS_Kanji
(Japanese)