SQL/MX Guide to Stored Procedures in Java (G06.24+, H06.03+)
Managing SPJs in NonStop SQL/MX
HP NonStop SQL/MX Guide to Stored Procedures in Java—523727-004
6-13
Showing the Syntax of an SPJ
The output of the SHOWDDL command does not exactly match the original CREATE
PROCEDURE statement in these ways:
•
The SHOWDDL command does not omit the optional clauses, such as
LOCATION, CONTAINS SQL, NOT DETERMINISTIC, and ISOLATE.
•
The SHOWDDL command always generates a Java signature for the SPJ.
•
The SHOWDDL command displays DECIMAL or NUMERIC data types instead of
PIC S9, when PIC S9 is specified for an SQL parameter, because NonStop
SQL/MX stores PIC S9 as one of these data types.
•
The SHOWDDL command displays CHARACTER data types instead of PIC X,
when PIC X is specified for an SQL parameter, because NonStop SQL/MX stores
PIC X as a CHAR data type.
•
The SHOWDDL command displays the NCHAR data type as a CHAR type with
UCS2 (or ISO88591, KANJI, or KSC5601) as the CHARACTER SET modifier.
•
All ANSI names are fully qualified.
•
All physical location names are fully expanded.
The SHOWDDL command for an SPJ named ADJUSTSALARY returns this output:
For more information about ADJUSTSALARY and its underlying SPJ method,
adjustSalary(), see Appendix A, Sample SPJs.
CREATE PROCEDURE SAMDBCAT.PERSNL.ADJUSTSALARY
(
IN EMPNUM NUMERIC(4)
, IN PERCENT DOUBLE PRECISION
, OUT NEWSALARY NUMERIC(8,2)
)
EXTERNAL NAME 'Payroll.adjustSalary
(java.math.BigDecimal,double,java.math.BigDecimal[])'
EXTERNAL PATH '/usr/mydir/myclasses'
LOCATION \KINGPIN.$TX0115.ZSDPK4GV.Q85DXB00
LANGUAGE JAVA
PARAMETER STYLE JAVA
MODIFIES SQL DATA
NOT DETERMINISTIC
ISOLATE
;
--- SQL operation complete.