DB2FEDGENTF command
Creates and registers table functions that return result sets from federated procedures.
The db2fedgentf command retrieves the JDK path from the DBM configuration parameter JDK_PATH.
Syntax
Parameters
- -db database
- Specifies the name of the database that you want to connect to.
- -u userID
- Specifies the federated database user ID.
- -p password
- Specifies the password of the user ID.
- -create
- Creates and registers a table function in the current schema if
the -tfs parameter is not specified. The table
function returns the specified columns of the result set from the
federated procedure.
- -stpn fstp_Name
- Specifies the name of the federated procedure.
- -tfn table_Func_Name
- Specifies the name of the table function. If the name of the table function is not specified, the federated procedure name is used.
- -c 'columns'
- Specifies a comma-delimited list that includes the column name
and column-type pairs in the signature of the result set returned
by the federated procedure.
- Example
- The column names are PID, PRICE, and QTY, and the column types
are CHAR(10), DOUBLE, and INT:
‘PID CHAR(10), PRICE DOUBLE, QTY INT'
- -stps fstp_Schema
- Specifies the schema of the federated procedure. This parameter is optional. If a name is not specified, the default SQL schema as defined in the CURRENT SCHEMA special register is used.
- -stpc number_Fstp_Params
- Specifies the number of the inputs for the federated procedure. This parameter is optional. If the number of the inputs is not specified, the federated procedure is determined by the specified federated procedure name. If the federated procedures are overloaded, you receive an error.
- -tfs table_Func_Schema
- Specifies the schema of the table function. This parameter is optional. If the schema of the table function is not specified, the default SQL schema as defined in the CURRENT SCHEMA special register is used.
- - drop
- Drops the table function that you specify. The description from
the catalog is also deleted and all packages that reference the specified
table function become invalid.
- -tfs table_Func_Schema
- Specifies the schema of the table function that you want to drop. If schema of the table function is not specified, the default SQL schema as defined in the CURRENT SCHEMA special register is used.
- -tfn table_Func_Name
- Specifies the name of the table function that you want to drop.
- -tfsn specific_Table_Func_Name
- For overloaded functions, specifies the specific name of the table function that you want to drop. This parameter is mutually exclusive with the -tfn table_Func_Name parameter. You do not need to specify this option if the table function is uniquely identified by its name and schema. This parameter is optional.
- -h|help
- Provides usage information for the DB2FEDGENTF command.
Examples
In this example, the DB2FEDGENTF command runs on the EAST_INVTRY federated procedure to create the table function S1_INVTRY_TF that returns the PRODID, PRICE, and QTY columns:DB2FEDGENTF -db sample -u user1 -p password1
-create
-stpn EAST_INVTRY
-tfn E_INVTRY_TF
-c ‘PRODID INT, PRICE DOUBLE, QTY INT'
