Hi there,
we are trying to create a stored procedure into a db2 v8 using ther control
manager.
We are connected to our base wich name is DB_AGRO
We typed in the text in the command field as this :
CREATE PROCEDURE SYSPROC.SP_COMP TEUR (IN lib VARCHAR(16), OUT val INTEGER)
SPECIFIC SP_COMPTEUR
LANGUAGE SQL
BEGIN
IF lib IS NULL
THEN
SIGNAL lib_is_null SET MESSAGE_TEXT = 'Valeur NULL passée en argument'
END IF
RETURN -1
END
We tryed many syntaxes; Sometimes it fail with a error message saying that
an unexpected end of command (SQL0104) and sometimes it accept it without
saying anything except command entered.
But never the SP appear in the database !
Something is missing I suppose.
The question is HOW do we create a simple SP and in wich window, field or
command ligne of wich tool ???
Thanks in advance !
we are trying to create a stored procedure into a db2 v8 using ther control
manager.
We are connected to our base wich name is DB_AGRO
We typed in the text in the command field as this :
CREATE PROCEDURE SYSPROC.SP_COMP TEUR (IN lib VARCHAR(16), OUT val INTEGER)
SPECIFIC SP_COMPTEUR
LANGUAGE SQL
BEGIN
IF lib IS NULL
THEN
SIGNAL lib_is_null SET MESSAGE_TEXT = 'Valeur NULL passée en argument'
END IF
RETURN -1
END
We tryed many syntaxes; Sometimes it fail with a error message saying that
an unexpected end of command (SQL0104) and sometimes it accept it without
saying anything except command entered.
But never the SP appear in the database !
Something is missing I suppose.
The question is HOW do we create a simple SP and in wich window, field or
command ligne of wich tool ???
Thanks in advance !