-
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 Authorization ID field, type a DB2 user name. This
setting is used to control remote access. When a CALL statement invokes
the stored procedure remotely, the system compares this setting to the
calling authorization ID. The authorization ID can be up to 8 characters
long. If you leave this field blank a default value is used.
-
Optional: In the LUNAME field, type the LUNAME
of a system. The LUNAME can be up to 8 characters long. Values in the LUNAME
field determine which clients can access stored procedures:
-
If the LUNAME setting contains the local DB2 system's LUNAME, the
associated row in SYSIBM.SYSPROCEDURES
applies to local applications that issue the SQL CALL statement.
-
If the LUNAME column contains the LUNAME of a remote client, the associated
row in SYSIBM.SYSPROCEDURES applies
to SQL CALL statements received from that remote client.If LUNAME is blank, the values in this row apply to all systems, including
the local DB2 system and clients connected through TCP/IP or SNA.
Tip: To ease migration to future releases of DB2, leave this field
blank.
-
In the Member name field, type the name of the MVS load module for
DB2 to use when running a stored procedure. The name can be up to
8 characters long; it is required.
-
Optional: Define the linkage convention that DB2 uses to pass parameters
to the stored procedure by selecting a radio button under Linkage convention:
-
Simple
-
Use this setting if input parameters cannot be null.
-
Simple with nulls
-
Use this setting if an indicator array is passed to the stored procedure
(and where null input parameters are allowed).
-
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.
-
Optional: In the Service units field, type the number of service
units permitted for any single invocation of the stored procedure.
This field accepts 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 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: In the WLM environment name field, type the name of the
address space where the stored procedure will run.
The WLM environment name can be up to 18 characters long. The default
value is blank, which indicates that the procedure will run in the stored
procedure's address space established by DB2.
-
Optional: Select a program type to specify whether this stored procedure
runs as a main routine or a subroutine.
-
If you want the load module to remain resident in memory after the stored
procedure ends, select the Yes check box under Stay resident
at exit.
-
If you want to require a special RACF environment to control access to
non-SQL resources, select the RACF required check box.
Tip: If a stored procedure accesses only SQL objects, you
can use the default. Stored procedures that access non-DB2 resource, such
as IMS or CICS transactions, MVS/APPC conversations, or VSAM files, might
need to use RACF to manage access to non-SQL resources. If you select RACF
required, then DB2 sets up a separate RACF environment each time the
stored procedure is invoked.
Important: If the WLM environment setting is blank then the stored
procedure runs in the stored procedures address space established by DB2,
and the user ID of the stored procedures address space is used to access
non-SQL resources.
-
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.)