This chapter discusses the details of how you write your own UDF, the issues you need to consider, and the steps required to make your UDF operational. Specifically, the following major topics are discussed:
After a preliminary discussion on the interface between DB2 and a UDF, the remaining discussion concerns how you implement UDFs. The information on writing the UDF emphasizes the presence or absence of a scratchpad as one of the primary considerations.
Some general considerations in using this section are:
You can find information on compiling and linking UDFs in the DB2 SDK Building Applications book for your platform.
Note that a sourced UDF, which is different from an external UDF, does not require an implementation in the form of a separate piece of code. Such a UDF uses the same implementation as its source function, along with many of its other attributes.