Problem Note 4122: An invalid IN clause will be generated for DB2 when the system option
DB2DECPT is set to a comma
SAS/ACCESS to DB2 on MVS has a system option DB2DECPT= that controls
whether decimal values are passed with either a comma (as is done in
Europe) or a decimal point (as is done in the USA). Problems can
occur if DB2DECPT= is set to a comma and the IN operator is used on
the WHERE clause specifying a decimal variable. DB2 requires that if
a comma is substituted as the decimal point, the comma intended as a
separator must be followed by a space. SAS does not put that space
after the comma separator.
When the following query is submitted:
proc print data=db2.decimal2;
where x in (4.45, 1.31, 9.87, 4.23);
run;
the following is passed to DB2:
SELECT "X" FROM SASMBA.DECIMAL2 WHERE ( ("X" IN (1,3100000000000000
,4,2300000000000000 ,4,4500000000000000 ,9,8700000000000000 ) ) ) FOR
FETCH ONLY
instead of the correct:
SELECT "X" FROM SASMBA.DECIMAL2 WHERE ( ("X" IN (1,3100000000000000
, 4,2300000000000000 , 4,4500000000000000 , 9,8700000000000000 ) ) )
FOR FETCH ONLY
The only workaround is to switch to using the pass-through facility,
rather than using implicit pass-through.
A Technical Support hot fix for Release 8.1 TSLEVEL TS1M0 for this
issue is available at:
http://www.sas.com/techsup/download/hotfix/81_sbcs_prod_list.html#004122
This problem is corrected in Release 8.2 TSLEVEL 2M0 and beyond.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to DB2 | z/OS | 8 TS M0 | 8.2 TS2M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | high |
| Topic: | Data Management ==> Data Sources ==> External Databases ==> DB2 SAS Reference ==> LIBNAME Engines
|
| Date Modified: | 2002-04-16 12:24:58 |
| Date Created: | 2001-01-16 14:11:29 |