Example 1: Create the procedure definition for a procedure, written in Java(TM), that is passed a part number and returns the cost of the part and the quantity that are currently available.
CREATE PROCEDURE PARTS_ON_HAND (IN PARTNUM INTEGER, OUT COST DECIMAL(7,2), OUT QUANTITY INTEGER) LANGUAGE JAVA PARAMETER STYLE JAVA EXTERNAL NAME 'parts.onhand'
Example 2: Create the procedure definition for a procedure, written in C, that is passed an assembly number and returns the number of parts that make up the assembly, total part cost and a result set that lists the part numbers, quantity and unit cost of each part.
CREATE PROCEDURE ASSEMBLY_PARTS (IN ASSEMBLY_NUM INTEGER, OUT NUM_PARTS INTEGER, OUT COST DOUBLE) LANGUAGE C PARAMETER STYLE GENERAL DYNAMIC RESULT SETS 1 FENCED EXTERNAL NAME ASSEMBLY
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.