Running the following shell script (DB2 8.1.5, LINUX):
db2 <<END
connect to animals
set schema is3
SET PATH = CURRENT PATH, IS3@
call make_angus_animals()
commit
quit
END
I am getting the following message (among other innocuous ones):
SQL0440N No authorized routine named "MAKE_ANGUS_ANIMALS" of type
"PROCEDURE" having compatible arguments was found. SQLSTATE=42884
I ran the following shell script (with many lines elided) to create the
procedure, which completed without error:
-- vim: set ai sw=4 ts=4:
--
-- Create the animals, awards, herdid and gene_defects tables from
angus_in and animals_in;
-- tattoo is the link.
--
connect to animals@
--
set schema is3@
--
SET PATH = CURRENT PATH, IS3@
--
drop procedure make_angus_animals@
--
CREATE PROCEDURE make_angus_animals()
LANGUAGE SQL
BEGIN
-- variables for checking record read or not
DECLARE SQLSTATE CHAR(5);
DECLARE v_at_end INT DEFAULT 0;
..
.. lots of code omitted
..
END LOOP;
CLOSE c1;
INSERT INTO is.debugging VALUES (CURRENT_TIMESTAMP,v_program,
'Routine ended');
END @
--
GRANT EXECUTE ON PROCEDURE make_angus_animals TO PUBLIC@
I don't understand! I have read the manual's relevant parts (CALL,
CREATE PROCEDURE, GRANT EXECUTE, etc.) and I can't see my error. I must
be missing something obvious. Any pointers to the cause of the problem
would be greatly appreciated.