-
In the Procedure schema field, specify a schema. The specified schema
is used as the second part of the three-part name.
Tip: To display a list of existing objects,
click the
(Browse)
button next to the field. Select an existing object from the
list.
-
In the Procedure name field, type the name of the procedure. The
procedure name can be up to 18 characters long and must not duplicate an
existing stored procedure at the current server.
-
Optional: In the External name field, type a name that identifies
the user-written code that implements the stored procedure.
The name must not be longer than 8 characters and must conform to the
naming conventions for MVS load modules. If you do not specify a name,
the procedure implicitly uses the procedure name as the external name.
In this case the procedure name must not be longer than 8 characters.
-
Optional: In the Collection ID field, type the name of the package
collection to use when the stored procedure is executed.
The collection ID can be up to 18 characters long. Leaving this field
blank indicates that the package collection is the same as the package
collection of the program that issued the SQL CALL statement.
-
From the SQL list, select one of the following choices:
-
Contains SQL
-
This is the default. The stored procedure can contain any SQL statements
except for:
-
COMMIT
-
DELETE
-
INSERT
-
PREPARE INTO
-
ROLLBACK
-
SELECT
-
UPDATE
-
No SQL
-
The stored procedure cannot contain any SQL statements
-
Reads SQL
-
The stored procedure can contain any SQL statements except for:
-
COMMIT
-
DELETE
-
INSERT
-
ROLLBACK
-
UPDATE
-
Modifies SQL
-
The stored procedure can contain any SQL statements except for:
-
COMMIT
-
DELETE
-
INSERT
-
ROLLBACK
-
Optional: In the Result sets returned field, type the maximum number
of query result sets that can be returned by this stored procedure.
This field accepts the small integer data type; the default value is
zero. A value of zero indicates that no query results set is returned.
-
Optional: Select a program type to specify whether this stored procedure
runs as a Main routine or a Subroutine.
-
If successive calls of the stored procedure with identical input arguments
return the same results, select the Results are deterministic check
box.
-
If the stored procedure requires specific information known by DB2, select
the DB2 information is passed check box.
If you select this check box, an additional argument is passed when
the stored procedure is invoked. For information about this argument, see
the DB2 Application Programming and SQL Guide.
-
If you want the load module to remain resident in memory after the stored
procedure ends, select the Stay resident at exit check box.
-
If you want the unit of work to be committed immediately upon the successful
return from this stored procedure, select the Commit on return check
box. (A non-negative SQL code signifies a successful return.)
-
Optional: If you want to limit the service units permitted for any single
invocation of the stored procedure, select the Limit service units
check box and type the number of service units in the field.
The field acceptsonly non-negative integers; the default value
is zero. Zero indicates that there is no limit on the service units. If
you set this field to a value other than zero and a stored procedure uses
more service units than allowed by the setting, DB2 cancels the stored
procedure.
-
Optional: In the Comment field, type a comment for this procedure.