IBM Support

JR27937: ERROR -901 RETURNED WHEN INVOKING A FUNCTION THAT HAS THE "MODIFIES SQL DATA " ATTRIBUTE."

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • the following criteria are required to reproduce the problem:
    
    - a for loop that has a SELECT statement to define a cursor
    - the SELECT statement in the for-loop cursor has a common table
    expression. i.e. using the WITH clause.
    - the select-statement references a table function with MODIFIES
    SQL DATA
    
    e.g.
    
    create function fn_mod_bug(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(fn_mod_bug(d.ibmreqd)) f(c)
       )
       select c from t
     do
       set a=v1.c;
     end for;
    end
    @
    

Local fix

  • remove the "modifies sql data " clause if possible.
    

Problem summary

  • Users affected : users having functions with "modifies sql data"
    attribute Problem description : incorrect -901 error returned
    Problem Summary : this apar fix avoids this error.
    

Problem conclusion

  • First fixed in DB2 UDB Version 9, Fixpak 5
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR27937

  • Reported component name

    DB2 UDB ESE WIN

  • Reported component ID

    5765F4101

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-12-01

  • Closed date

    2008-06-27

  • Last modified date

    2008-06-27

  • APAR is sysrouted FROM one or more of the following:

    JR27916

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 UDB ESE WIN

  • Fixed component ID

    5765F4101

Applicable component levels

  • R910 PSY

       UP

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910"}]

Document Information

Modified date:
07 October 2021