IBM Support

LI73961: IMPROPER HANDLING WHERE THE SAME VARIABLE IS PASSED TO IN AND OUT PARAMETERS SIMULTANEOUSLY WHEN CALLING A PROCEDURE.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If a variable is passed to two separate parameters in the same
    CALL, where one parameter in the called procedure is declared
    with intent IN and the other with intent OUT,
    there are two cases will be found:
    
    1)
    create procedure P(in A integer, out B integer)
    begin
      set B = A;
    end
    @
    create procedure Q(out Result integer)
    begin
      declare I integer default 42;
    
      call P(I, I);
      set Result = I;
    end
    @
    
    You will receive an error when "call Q(?)":
    SQL0901N  The SQL statement failed because of a non-severe
    system error.
    Subsequent SQL statements can be processed.  (Reason "source is
    same as
    target".)  SQLSTATE=58004
    
    This symptom can be found in version 9.5 only.
    
    2)
    create procedure P(in A char(10), out B char(10))
    begin
      set B = UPPER(A);
    end
    @
    
    create procedure Q(out Result char(10))
    begin
      declare I char(10) default 'abc';
      call P(I, I);
      set Result = I;
    end
    @
    
    You will receive an NULL result when "call Q(?)":
    
      Value of output parameters
      --------------------------
      Parameter Name  : RESULT
      Parameter Value : -
    
      Return Status = 0
    
    Please note, we use a function UPPER() in the second case.
    This symptom can be found in version 9.1 and 9.5.
    

Local fix

  • Use different variables as IN and OUT parameters while calling a
    procedure.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL.                                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See error description.                                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to db2 version 9.1 fix pack 8 or later.              *
    ****************************************************************
    

Problem conclusion

  • This problem is first fixed in db2 version 9.1 fix pack 8.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI73961

  • Reported component name

    DB2 UDE ESE LIN

  • Reported component ID

    5765F4104

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-12-15

  • Closed date

    2009-10-09

  • Last modified date

    2009-10-09

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

    LI73950

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

Fix information

  • Fixed component name

    DB2 UDE ESE LIN

  • Fixed component ID

    5765F4104

Applicable component levels

  • R910 PSN

       UP

[{"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","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 October 2021