User-defined functions

A user-defined function is a program that can be called like any built-in function.

DB2® UDB for iSeries™ supports external functions, SQL functions, and sourced functions. External functions can be any system ILE program or service program. An SQL function is defined entirely in SQL and can contain SQL statements, including SQL control statements. A sourced function is built over any built-in or any existing user-defined function. You can create a scalar function or a table function as either an SQL or external function.

Related concepts
Use user-defined functions (UDFs)