SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)

SQL Data Type
The SQL data types must correspond with the underlying Java data types of the SPJ method, as
shown:
Because the Java signature of the SPJ method in this example is (BigDecimal, double,
BigDecimal[]), you should specify these SQL data types, or similar ones, for the procedure:
(NUMERIC, FLOAT, NUMERIC). Recall that all output parameters (OUT and INOUT) of a Java
method must be arrays that accept a single value. (See Returning Output Values From the Java
Method (page 50).) In this example, the type of the output parameter, BigDecimal[], corresponds
with the SQL type, NUMERIC.
For mappings between SQL/MX and Java data types, see Table 3 (page 62)
Table 3 Mapping of SQL/MX Data Types to Java Data Types
Maps to Java Data Type...SQL/MX Data Type
java.lang.StringCHAR[ACTER]*
CHAR[ACTER] VARYING *
VARCHAR*
* PIC[TURE] X *
NCHAR
NCHAR VARYING
NATIONAL CHAR[ACTER]
NATIONAL CHAR[ACTER] VARYING
java.sql.DateDATE
java.sql.TimeTIME
java.sql.TimestampTIMESTAMP
java.math.BigDecimalNUMERIC**
DEC[IMAL]**
PIC[TURE] S9
shortSMALLINT**
int (or java.lang.Integer if specified)***INT[EGER]**
long (or java.lang.Long if specified)***LARGEINT
double (or java.lang.Double if specified)***FLOAT
float (or java.lang.Float if specified)***REAL
62 Registering SPJs in NonStop SQL/MX