Usage Note 55490: DB2 data is not displayed correctly or is truncated when you use SAS/ACCESS® Interface to DB2
When you use SAS/ACCESS Interface to DB2 to connect to DB2, you might encounter these issues:
The message appears because the DB2 encoding on the DB2 server does not match the DB2 encoding on the client.
To set the DB2 encoding correctly in SAS/ACCESS Interface to DB2, follow these steps:
- Run this query using the DB2 Command Line Processor to determine the value for the DB2CODEPAGE environment variable on the DB2 server:
SELECT CODEPAGE FROM SYSCAT.DATATYPES WHERE TYPENAME='VARCHAR';
Take note of the number that is returned and use it as the value for the DB2CODEPAGE environment variable in Step 2.
- Set DB2CODEPAGE by following the steps for your operating environment:
- If SAS/ACCESS Interface to DB2 is installed on a Microsoft Windows system:
- Select Start ► Control Panel and click System. Then click Advanced system settings on the left.
- In the System Properties dialog box, click the Advanced tab.
- Click Environment Variables.
- In the System variables section, click New.
- In the Variable name field, enter DB2CODEPAGE.
- In the Variable value field, enter the value that was returned when you ran the query in Step 1.
- If SAS/ACCESS Interface to DB2 is installed on a UNIX system:
- Open the sasenv_local file, located in !SASROOT/bin.
- Add this command to the file:
export DB2CODEPAGE=DB2CODEPAGE-value
- Open a new SAS® session to verify that your data is displayed correctly.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to DB2 | Windows Vista | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 R2 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 TS1M0 | |
HP-UX IPF | 9.3 TS1M0 | |
Linux | 9.3 TS1M0 | |
Linux for x64 | 9.3 TS1M0 | |
Solaris for x64 | 9.3 TS1M0 | |
*
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.
You encounter issues with how DB2 data is displayed when using SAS/ACCESS Interface to DB2 because DB2 encoding on the DB2 server and on the client do not match.
Date Modified: | 2015-05-27 16:36:37 |
Date Created: | 2015-04-02 15:37:09 |