No idea about the DB2 warning, but the SQL error does seem to imply
that the arguments were not correct for whatever invocation was made [or
perhaps that a matching procedure exists, but is not authorized]. Note
that the procedure name is upper-cased in the message, so ensure
delimiters are used if\when required to preserve case. Also verify the
path being used.
There is no indication of what the "command" was that was entered at
the command line. Perhaps a CREATE FUNCTION, or a SELECT statement
referencing a UDF from a prior CREATE FUNCTION as either a sibling or
dynamic statement processor to effect the SQL CALL to the routine from a
prior CREATE PROCEDURE? What was and was not qualified versus
implicitly qualified by the PATH?
Why not try scripting a very simplified variation of a TABLE,
PROCEDURE, FUNCTION, and the SELECT to see if that gives the same
issue(s). If so, then include the script and where are the error(s).
For example, the following script [a table to establish a row value to
SELECT and another to be acted upon in the procedure] runs fine for me
[with autocommit]:
<code>
-- set current schema and current path if not authorization id
create table my_t1 (b bigint)
;
create table my_tt as
(select cast(200 as bigint) as i from sysibm.sysdummy1)
with data
;
create procedure "my_p1" (in a_p_id bigint) language sql
insert into my_t1 values(a_p_id)
;
create function my_f1 (a_p_id bigint) returns int
language sql not deterministic modifies sql data
begin
declare exit handler for SQLEXCEPTION return NULL;
call "my_p1" (a_p_id);
return 1;
end
;
select my_f1(i) from my_tt where i > 0
;
select b from my_t1
;
</code>
Regards, Chuck