HP Neoview Release 2.5 Software User Manual
Page 166
•
You must be the owner of the schema or have SUPER.SUPER or SUPER.SERVICES privileges,
and have read access to the .jar file that contains the SPJ Java method.
•
The catalog and schema of the SPJ must already exist.
To create a procedure:
1.
In HPDM, select the Database area. For more information, see
.
2.
Expand the navigation tree pane so that you can see the name of the schema in which you
want to create the procedure and the Procedures folder under the schema.
3.
Right-click the Procedures folder, and select Create Procedure. The Create Procedure
dialog box appears.
4.
In the Name field, enter a name for the stored procedure. For detailed information about
the Name field, see
“Use the Create Procedure Dialog Box” (page 167)
5.
In the Code group box, click [ Browse ] to open the Procedure Code File Browser. Use
the browser to select a method from a JAR file.
NOTE:
The left pane of the Procedure Code File Browser shows folders for your Neoview
role and private user ID. If you select the role folder, the Procedure Code File Browser
shows all of the JAR files for the Neoview role that you used to connect to the current system.
The role is your default role unless you specified a different role in the system definition.
If an SPJ JAR file does not exist on the Neoview platform, you can upload it. See
6.
In the Parameters group box, verify that the SQL parameters are mapped correctly to the
Java parameters of the SPJ method.
NOTE:
The result set parameters (java.sql.ResultSet[]) in the Java signature do not
have corresponding SQL parameters.
a.
To change an SQL parameter, such as the name of the parameter, the SQL data type,
or the parameter mode (direction) select the parameter and click [ Edit ]. The Edit
Parameter
dialog box appears.
b.
In the Edit Parameter dialog box, enter a new name for the parameter, select a different
SQL data type, if permitted, or select a different parameter mode (direction), if permitted.
When changing the parameter name, note that the parameter name:
•
Is not case-sensitive
•
Must not be a reserved word
•
Must not contain spaces
•
Must begin with a letter, digit, or underscore
When changing the SQL data type, select a data type that is appropriate for the parameter
of the underlying Java method. For more information, see the Neoview Guide to Stored
Procedures in Java. For information about SQL data types, see the Neoview SQL Reference
Manual.
For character string parameters, select either ISO88591 or UCS2 depending on the
column definition and the character set configuration of your Neoview platform. For
guidelines, see the Neoview Character Sets Administrator's Guide.
c.
Click [ OK ] to accept the changes, or click [ Cancel ] to quit the Edit Parameter dialog
box.
d.
Repeat steps a to c for each parameter that you want to change.
7.
In the Attributes group box, if your SPJ method returns result sets, enter the maximum
number of result sets to be returned for Number of dynamic result sets. The valid range
166
Manage Procedures