Functions Editor (IBM DB2 LUW)

From DBArtisan
Jump to: navigation, search

Go Up to IBM DB2 for Linux, Unix, and Windows Object Editors

The Functions Editor lets you manage the body, inputs and outputs, and properties for a function.

To edit a function

  1. Open an editor on the function. For details, see Opening an Object Editor.
  2. Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:
Tab Settings and tasks

Properties

Displays the Language, Return Type, External Name, SQL Access Level, Origin, Threadsafe, Fenced, Scratchpad, Scratchpad Length, Allow Parallel, Final Call, Parameter Style, Inherit Special Registers, DBInfo, Deterministic, External Action, Called on Null Input, and Parameter CCSID properties.

Parameters

Lets you manage function parameters. On opening, this tab shows the existing parameters. Optionally you can:

Select a parameter from the list, modify the Type and if appropriate, the Precision, Size, and Scale of the parameter.

Click the New button, provide a name for the new parameter and modify its attributes.

Select a parameter and click the Drop button to delete the parameter.

Select a parameter and use the arrow buttons to reorder the parameter list.

Return Scalar (only available for functions created with a Function Type of EXTERNAL SCALAR, SOURCED or TEMPLATE and for SQL Function Type functions with an explicit Return Type of SCALAR)

Lets you change the Type of a return scalar and depending on the type specified, modify the Precision, Scale, and Size of the return scalar.

Return Columns (only available for functions created with a Function Type of OLEDB and EXTERNAL TABLE and for SQL Function Type functions with an explicit Return Type of TABLE or ROW )

Lets you manage return columns for a function. On opening, this tab shows the existing columns. Optionally you can:

Select a column from the list, modify the Type and if appropriate, the Precision, Size, and Scale of the parameter. You can also specify that the return column is to be treated As Locator.

Click the New button, provide a name for the new column and modify its attributes.

Select a parameter and click the Drop button to delete the parameter.

Select a parameter and use the arrow buttons to reorder the parameter list.

Body

Lets you edit the body of the function.

Comment

For details on using this tab, see Adding a Comment to an object.

Dependencies

For details on using this tab, see Working with Object Dependencies.

Permissions

For details on using this tab, see Working with Privileges and Permissions.

DDL View

For details on using this tab, see Viewing the SQL/DDL for an Object.

3. When finished, you can submit your changes. For details, see Previewing and Submitting Object Editor Changes.