DB2 - Problem description
| Problem IT03447 | Status: Closed |
DB2 VARCHAR_BIT_FORMAT ALLOWING SPACES/BLANKS | |
| product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
| Problem description: | |
DB2 function HEXTORAW (VARCHAR_BIT_FORMAT) accepts spaces as
valid
characters
The HEXTORAW function is a synonym for the VARCHAR_BIT_FORMAT
function
with a single argument. The documentation for VARCHAR_BIT_FORMAT
states:
"
If a format-string argument is not specified, the length must
be an
even number of characters from the ranges '0' to '9', 'a' to
'f', and
'A' to 'F' (SQLSTATE 42815)."
Consequently, the following function call delivers an error:
db2 "select VARCHAR_BIT_FORMAT('3FGG') from sysibm.sysdummy1"
1
SQL0171N The data type, length or value of the argument for the
parameter in
position "1" of routine "SYSIBM.VARCHAR_BIT_FORMAT" is
incorrect.
Parameter
name: "character-expression". SQLSTATE=42815
However, leading and trailing spaces and also SPACES IN THE
MIDDLE do
not result in an error and are simply ignored:
db2 "select VARCHAR_BIT_FORMAT('3F AA') from sysibm.sysdummy1"
1
x'3FAA'
db2 "select VARCHAR_BIT_FORMAT(' 3FAA') from sysibm.sysdummy1"
1
x'3FAA'
db2 "select VARCHAR_BIT_FORMAT('3FAA ') from sysibm.sysdummy1"
1
x'3FAA'
This APAR will allow for the implementation of this function to
return an error
SQL0171N if spaces are included in the string.
This fix will include, under the SAP registry settings
DB2_WORKLOAD=SAP, the value DISABLE_BLANK_TOLERANCE for
DB2_RUNTIME_DEBUG_FLAGS (with SAP workload the value will be
DB2_RUNTIME_DEBUG_FLAGS= TOLERANT_FLOAT,DISABLE_BLANK_TOLERANCE)
If using SAP workload this will be included by default.
If not using SAP workload set
DB2_RUNTIME_DEBUG_FLAGS=DISABLE_BLANK_TOLERANCE | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.5 and Fix Pack 5 * **************************************************************** | |
| Local Fix: | |
| Solution | |
Problem was first fixed in DB2 Version 10.5 and Fix Pack 5 | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 29.07.2014 13.03.2015 13.03.2015 |
| Problem solved at the following versions (IBM BugInfos) | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 10.5.0.5 |
|