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 Java523727-004
6-12
Showing the Syntax of an SPJ
The query returns the names of the schema, procedure, node (SYSTEM_NAME),
volume (DATA_SOURCE), and the subvolume and file (FILE_SUFFIX), as shown:
Showing the Syntax of an SPJ
To show the CREATE PROCEDURE syntax of an SPJ as it exists in system metadata,
use the SHOWDDL command. The SHOWDDL command generates a description of
the metadata for an SPJ and displays it in an MXCI session.
Use the SHOWDDL command to display information about SPJs that you have
migrated to the system from an earlier release of NonStop SQL/MX. For more
information, see the SQL/MX Database and Application Migration Guide.
You can also use the SHOWDDL command to create a replica of an SPJ. For more
information, see Regenerating CREATE PROCEDURE Statements on page 6-16.
Using the SHOWDDL Command
To display information about the SPJ named ADJUSTSALARY, for example, enter this
SHOWDDL command in an MXCI session:
SHOWDDL PROCEDURE samdbcat.persnl.adjustsalary;
For the syntax of the SHOWDDL command, see the SQL/MX Reference Manual.
Output of the SHOWDDL Command
The SHOWDDL command displays information about an SPJ in this format:
SCHEMA PROCEDURE SYSTEM_NAME DATA_SOURCE FILE_SUFFIX
-------- --------------- ----------- ----------- ------------------
PERSNL ADJUSTSALARY \KINGPIN $TX0115 ZSDPK4GV.Q85DXB00
SALES DAILYORDERS \KINGPIN $TX0115 ZSDX7KT4.N71HTB00
SALES LOWERPRICE \KINGPIN $TX0115 ZSDX7KT4.SL9FSB00
SALES MONTHLYORDERS \KINGPIN $TX0115 ZSDX7KT4.G13HVB00
SALES TOTALPRICE \KINGPIN $TX0115 ZSDX7KT4.T4BGWB00
--- 5 row(s) selected.
CREATE PROCEDURE catalog-name.schema-name.procedure-name
(
[sql-parameter
[{, sql-parameter}...]]
)
EXTERNAL NAME 'java-method-name (java-signature)'
EXTERNAL PATH 'class-or-JAR-file-path'
LOCATION procedure-label
LANGUAGE JAVA
PARAMETER STYLE JAVA
{NO SQL | MODIFIES SQL DATA | READS SQL DATA
| CONTAINS SQL}
{DETERMINISTIC | NOT DETERMINISTIC}
{NO ISOLATE | ISOLATE}
;