IBM Support

IC96967: SQL ROUTINES THAT USE THE SAME VARIABLE FOR BOTH THE IN AND OUT PARAMETERS MAY RETURN NULL

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If a routine uses the same variable for both the IN and OUT
    parameters, the OUT may be NULL when the routine is called after
    it has been rebound.  The following is an example of a call to a
    routine that is using the parameters in this way.
    
    call proc1(myvar, myvar)
    

Local fix

  • The issue will not occur if an INOUT parameter is used.
    Variables that will be both passing (IN) data and receiving data
    (OUT) can be declared as INOUT rather than passing in the
    variable twice. For example if the procedure was called as
    proc1(myvar, myvar), it can be called as proc1(myvar) if an
    INOUT rather than an IN and OUT parameter is used.
    
    For additional information on the INOUT parameter please see the
    Create procedure statement at the following Infocenter page.
    
    http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2
    Fcom.ibm.db2.luw.sql.ref.doc%2Fdoc%2Fr0003493.html
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * SQL routine users who use the same variable for the IN and   *
    * OUT parameters rather than using an INOUT parameter.         *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 10.1 Fix Pack 4.                      *
    ****************************************************************
    

Problem conclusion

  • First Fixed in Version 10.1 Fix Pack 4.
    

Temporary fix

  • Change the procedure to use an INOUT variable to both pass and
    receive the data.
    

Comments

APAR Information

  • APAR number

    IC96967

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-10-17

  • Closed date

    2014-06-30

  • Last modified date

    2014-06-30

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

    IC96108

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA10 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
30 June 2014