hi
we have an application and during its installation we compile all the procedures and functions using JDBC. the problem is that all the sql stored proceures compile successfully but during the compilation of the function (we have only one) it gives an error.
This function compiles successfully when we compile it using command line processor.


The function is as follows

*****************************************
CREATE FUNCTION IsNumeric
( in_DBString VARCHAR(255))
RETURNS INT
LANGUAGE SQL SPECIFIC IsNumeric NOT DETERMINISTIC READS SQL DATA
BEGIN ATOMIC
DECLARE HoldChar CHAR;
DECLARE lCount INT;
DECLARE DBString VARCHAR(255);
SET DBString = UPPER(RTRIM(in_DBString));
SET HoldChar = SUBSTR(DBString, 1, 1);

IF(LENGTH(DBString) = 0)
THEN
RETURN 0;
END IF;

WHILE LENGTH(DBString) > 0
DO
SET HoldChar = SUBSTR(DBString, 1, 1);
IF HoldChar NOT IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
THEN
RETURN 0;
END IF;
SET DBString = INSERT(DBString, 1, 1, '');
END WHILE;
RETURN 1;
END
*********************************

the error that it gives is


[IBM][CLI Driver][DB2/LINUX] SQL0104N An unexpected token "CHAR" was found following "DECLARE HoldChar". Expected tokens may include: "END-OF-STATEMENT". LINE NUMBER=1. SQLSTATE=42601


thanks in advance

harjan