Use the DB2 Stored Procedures editor to add, change, view, or delete a DB2 stored procedure for the model. As you define parameters, the Code tab of the editor is populated with SQL code, which you can review and edit.
To define DB2 stored procedures
The DB2 Stored Procedure Editor opens.
Note: Click New on the toolbar to create a stored procedure. Use the Enter filter text text box to filter a large list of names to locate the one you want to work with.
Specifies the name of the stored procedure.
Specifies the default schema for the stored procedure.
Specifies whether the stored procedure is Model Level or Table Level. Select from the drop-down list.
Indicates the procedure type. Select from the drop-down list; valid valules are External, Sourced, and SQL.
Specifies whether or not to use the CREATE or REPLACE command instead of the CREATE command during Forward Engineering.
Specifies to automatically attach the selected stored procedure to each new table that you create. Clear the check box if you do want to automatically attach the stored procedure to new tables.
Specifies whether or not to generate DDL for this object during Forward Engineering.
Specifies the name of the parameter. The name must be unique to the procedure.
Specifies the mode of the parameter. Select from the drop-down list; valid values are Input, Output, and Input Output.
Specifies the data type of the parameter. Select from the drop-down list.
Specifies whether the data type is for binary data.
Specifies the default value of the parameter. Create or select from the drop-down list.
Specifies the type of data to which the variable is anchored. Select from the drop-down list; valid values are: Variable, Column, Table Row, View Row, and Cursor Variable.
Specifies the global variable to which the selected variable is anchored. This field appears only when you set the value for the Anchored To Type field as either Variable or Cursor Variable.
Specifies the name of the table for the anchored column. This field appears only when you set the value for the Anchored To Type field as Table Row.
Specifies the name of the anchored column for the variable. This field appears only when you set the value for the Anchored To Type field as either Column or View Row.
Provides a unique name for the instance of the stored procedure that is being defined.
Indicates the level of data access for SQL statements included in the procedure. Select a value from the drop-down list; valid values are Modifies SQL Data, Reads SQL Data, and Contains SQL Data.
Specifies that the stored procedure takes some action that changes the state of an object not managed by the database manager.
Specfies that the stored procedure the procedure always returns the same results for given argument values.
Specifies the language in which the procedure body is written. Select from the drop-down list; valid values are C, Java, COBOL, OLE, SQL, and CLR.
Specifies the encoding scheme for the string data passed to and from of the procedure. Select from the drop-down list; valid values are ASCII and UNICODE.
Specifies the conventions for passing parameters to and returning values from procedures. Select from the drop-down list; valid values are DB2 General, DB2 SQL, General, General with Nulls, Java, and SQL.
Specifies how the stored procedure runs. Select from the drop-down list; valid values are Subroutine or Main Routine.
Specifies that the stored procedure runs in an external address space to prevent user programs from corrupting DB2 storage.
Specifies if the procedure is safe to run in the same process as other routines.
Specifies whether or not status information known by DB2 is passed to the stored procedure when it is invoked.
Specifies if the procedure is called regardless of whether any arguments are null. Select Called from the drop-down list if you want to call procedures with null arguments.
Specifies whether or not the procedure creates a savepoint level for savepoint names and effects.
Specifies if updatable special registers in the procedure inherit their initial values from the environment of the invoking statement. Select Inherit from the drop-down list if you want the special registers to inherit initial values.
Specifies the estimated maximum limit of the returned result sets for the procedure.
Specifies if you want to issue the COMMIT command after the procedure is executed.
Specifies whether or not you want the procedure to run in its own autonomous transaction scope.
Specifies the schema name of the source procedure.
Specifies the package name of the source procedure.
Specifies the number of parameters for the source procedure. Enter an integer.
Specifies the unique identifier for the source procedure; this identifier helps you identify the specific procedure when there are multiple identical procedures.
Specifies a server definition that you have registered using the CREATE SERVER statement.
Identifies the user-written code that implements the stored procedure.
Indicates the file to reference for the external name.
Identifes the class name. Enter a value in the text box.
Identifies the name of the method. Enter a value in the text box.
The DB2 for LUW Stored Procedure Editor closes.
Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |