home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC63611 Status: Geschlossen

EXECUTION OF STORED PROCEDURE ON Z/OS WITH NULL INPUT PARAMETER INSERTS
STRING "NULL" INSTEAD OF NULL VALUE

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
When executing a Stored Procedure on z/OS DB2 when input 
parameter is null, this will result with string NULL inserted as 
opposed to a null character. 
 
For example. 
db2 => create procedure sptest2(IN id char(20)) language sql 
begin insert into test values (id, 10); end 
 
db2 call sptest2(null) 
 
db2 select * from test 
 
A                            B 
--------                   ----------- 
null                               10        ===> A string 
"null" value is inserted 
 
If you instead insert into the table 
 
insert into test values (null, 8)   ===> this actually inserts a 
SQL null value in the table 
 
db2 select * from test 
 
A                            B 
--------                   ----------- 
-                                   8    ==> The "-" is showing 
as null under column "A" 
 
So the null character is shown and not the string null.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users of DB2 Connect to z/OS DB2                             * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* When executing a Stored Procedure on z/OS DB2 when input     * 
*                                                              * 
* parameter is null, this will result with string NULL         * 
* inserted as                                                  * 
* opposed to a null character.                                 * 
*                                                              * 
*                                                              * 
*                                                              * 
* For example.                                                 * 
*                                                              * 
* db2 => create procedure sptest2(IN id char(20)) language sql * 
*                                                              * 
* begin insert into test values (id, 10); end                  * 
*                                                              * 
*                                                              * 
*                                                              * 
* db2 call sptest2(null)                                       * 
*                                                              * 
*                                                              * 
*                                                              * 
* db2 select * from test                                       * 
*                                                              * 
*                                                              * 
*                                                              * 
* A                            B                               * 
*                                                              * 
* --------                   -----------                       * 
*                                                              * 
* null                               10        ===> A string   * 
*                                                              * 
* "null" value is inserted                                     * 
*                                                              * 
*                                                              * 
*                                                              * 
* If you instead insert into the table                         * 
*                                                              * 
*                                                              * 
*                                                              * 
* insert into test values (null, 8)   ===> this actually       * 
* inserts a                                                    * 
* SQL null value in the table                                  * 
*                                                              * 
*                                                              * 
*                                                              * 
* db2 select * from test                                       * 
*                                                              * 
*                                                              * 
*                                                              * 
* A                            B                               * 
*                                                              * 
* --------                   -----------                       * 
*                                                              * 
* -                                   8    ==> The "-" is      * 
* showing                                                      * 
* as null under column "A"                                     * 
*                                                              * 
*                                                              * 
*                                                              * 
* So the null character is shown and not the string null.      * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 9.1 fixpak 1.                         * 
****************************************************************
Local-Fix:
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.1 Fix Pack 10  for Linux, UNIX and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.1 Fix Pack 11  for Linux, UNIX and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.1 Fix Pack 12  for Linux, UNIX and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
Problem first fixed in DB2 Version 9.7 Fixpak 1.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
07.10.2009
19.01.2010
19.01.2010
Problem behoben ab folgender Versionen (IBM BugInfos)
9.1.,
9.7.
Problem behoben lt. FixList in der Version
9.1.0.9 FixList
9.7.0.1 FixList