CREATE PROCEDURE PART6(IN a FLOAT, IN b FLOAT, OUT retval FLOAT)
BEGIN
retval = a * b
END
The above procedure creation statement throws error saying
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "retval" was found following "retval FLOAT)
BEGIN ". Expected tokens may include: "WHILE". LINE NUMBER=2.
SQLSTATE=42601
SQL0104N An unexpected token "retval" was found following "retval FLOAT)
BEGIN
". Expected tokens may include: "WHILE ".
Explanation:
A syntax error in the SQL statement was detected at the specified
token following the text "<text>". The "<text>" field indicates
the 20 characters of the SQL statement that preceded the token
that is not valid.
As an aid to the programmer, a partial list of valid tokens is
provided in the SQLERRM field of the SQLCA as "<token-list>".
This list assumes the statement is correct to that point.
The statement cannot be processed.
Can anyboby help about whats the problem.. Am running this statement in Command editor in Control Center.
BEGIN
retval = a * b
END
The above procedure creation statement throws error saying
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "retval" was found following "retval FLOAT)
BEGIN ". Expected tokens may include: "WHILE". LINE NUMBER=2.
SQLSTATE=42601
SQL0104N An unexpected token "retval" was found following "retval FLOAT)
BEGIN
". Expected tokens may include: "WHILE ".
Explanation:
A syntax error in the SQL statement was detected at the specified
token following the text "<text>". The "<text>" field indicates
the 20 characters of the SQL statement that preceded the token
that is not valid.
As an aid to the programmer, a partial list of valid tokens is
provided in the SQLERRM field of the SQLCA as "<token-list>".
This list assumes the statement is correct to that point.
The statement cannot be processed.
Can anyboby help about whats the problem.. Am running this statement in Command editor in Control Center.
Comment