The required external body reference clause declares that the function is external to Vantage and identifies the location of the file components it must be able to run.
The optional external function name must be the name of the C or C++ source code file on the client system to retrieve and compile as part of the CREATE FUNCTION or REPLACE FUNCTION process.
If the external function name is not sufficient to specify the location of all the function components, you must specify (as a string literal) the path to each element. See External String Literal: CREATE FUNCTION and REPLACE FUNCTION (External Form).
Specify function_name to invoke the function from a SQL statement.
- External function name
- Parameter style
- External String Literal: CREATE FUNCTION and REPLACE FUNCTION (External Form)
- Function Entry Name Clause: CREATE FUNCTION and REPLACE FUNCTION (External Form) for information on the Include Name clause, Library Name clause, Object File Name clause, Package Name clause, and Source File Name clause
The following table summarizes the options you can specify in this clause.
Clause | Result |
---|---|
EXTERNAL | If you specify the SPECIFIC clause, the C or C++ function name must match specific_function_name. Otherwise, the C or C++ function name must match function_name. If client is mainframe-attached, C or C++ function name must be DDNAME for source. |
EXTERNAL NAME external_function_name | C or C++ function name must match function_name. If client is mainframe-attached, C or C++ function name must be DDNAME for source. |
EXTERNAL NAME 'string' | string can specify C or C++ function name using F option with function_entry_name, which must match name of C or C++ function. Maximum length of string is 1,000 characters. If you specify F option in string, you must also specify include, library, object, package, or source file name. If string does not specify function_entry_name: If you specify the SPECIFIC clause, the C or C++ function name must match specific_function_name. Otherwise, the C or C++ function name must match function_name. |
These specifications cannot be used for Java external procedures.
You can specify the parameter style for the function either in this clause or in the Optional Function Characteristics clause, but you can only specify the parameter style for a function one time in its definition. See "Parameter Style Clause" in Using Clauses: CREATE FUNCTION and REPLACE FUNCTION (External Form).