4.****@mail.ru wrote:
Hello.
v8.2.1
Please try this:
---
create function t(v char(1))
modifies sql data
returns table
(
c char(1)
)
begin atomic
return select v from sysibm.sysdummy1;
end@
begin atomic
declare a char(1);
for v1 as
with t (c) as
(
select f.c
from sysibm.sysdummy1 d,
table(t(d.ibmreqd)) f(c)
)
select c from t
do
set a=v1.c;
end for;
end@
----
At my 8.2.1 I get sql0901 with this reason in begin atomic block.
There is no error if the function is declared without "modifies sql
data" clause.
I want to know if this bug has been fixed or not.
Still fails on the DB2 Viper Test Drive.
Can you get an APAR opened?
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQLCA Information
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -901 sqlerrml: 26
sqlerrmc: column number out of range
sqlerrp : SQLNQ041
sqlerrd : (1) -2145779603 (2) 0 (3) 0
(4) 0 (5) -100 (6) 0
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 58004
Tell support that the error originates in SQLNQ041 (see sqlerrp above).
If anyone tries to give you a hard time refer them to me :-)
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab