Extenders, UDFs, and Stored Procedures
by Ken North

Listing One
SELECT id, surname, perannum(salary) from emp

Listing Two
CREATE FUNCTION metaname (en_string)
  RETURNS VARCHAR
  EXTERNAL NAME 'encode!metaname'
  LANGUAGE JAVA
  PARAMETER STYLE DB2GENERAL
  NO SQL
  FENCED

Listing Three
Connection con = getConnection ();

Listing Four
CREATE PROCEDURE BOOKS_IN_STOCK (IN BOOK_NUM  DOUBLE,
                     OUT PRICE DECIMAL(6,2),
                     OUT QTY DOUBLE)
EXTERNAL NAME 'books!instock'
RESULT SETS 1 
FENCED
LANGUAGE JAVA 
PARAMETER STYLE DB2GENERAL



1


