Problem Note 70515: Columns with an unexpected length can occur because the SQL procedure might ignore the LENGTH column modifier
The LENGTH column modifier might be ignored in PROC SQL when using the DBSERVER_MAX_BYTES=1 LIBNAME option.
For example, if a database column contains a length of 8, then the following SELECT clause would be expected to result in a column with a length of 2. However, a column with a length of 8 occurs instead.
LIBNAME libref ORACLE PATH="path" USER=user PASSWORD=password DBCLIENT_MAX_BYTES=1 DBSERVER_MAX_BYTES=1;
PROC SQL;
CREATE TABLE work.table-name AS
SELECT oracle-column-name AS alias-name LENGTH=2
FROM libref.oracle-table;
quit;
This behavior is likely to occur in SAS® Data Integration Studio jobs where column mappings display a warning in the GUI, and the generated code writes a warning message similar to the following:
WARNING: Mapping of the target column alias-name is too short for the specified source column oracle-column-name. Values will be truncated.
A workaround for this issue is to explicitly truncate the column. For example, you could change the SELECT clause above to the following:
SELECT SUBSTR(oracle-column-name,1,2) AS alias-name LENGTH=2
A hot fix is planned for this issue.
Operating System and Release Information
SAS System | Base SAS | Solaris for x64 | 9.4_M6 | | 9.4 TS1M6 | |
Linux for x64 | 9.4_M6 | | 9.4 TS1M6 | |
HP-UX IPF | 9.4_M6 | | 9.4 TS1M6 | |
64-bit Enabled Solaris | 9.4_M6 | | 9.4 TS1M6 | |
64-bit Enabled AIX | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Ultimate x64 | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Ultimate 32 bit | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Professional x64 | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Professional 32 bit | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Home Premium x64 | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Home Premium 32 bit | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Enterprise x64 | 9.4_M6 | | 9.4 TS1M6 | |
Windows 7 Enterprise 32 bit | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2019 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2016 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2012 Std | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2012 R2 Std | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2012 Datacenter | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2008 for x64 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2008 R2 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows Server 2008 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 10 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8.1 Pro x64 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8 Pro x64 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8 Pro 32-bit | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8 Enterprise x64 | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M6 | | 9.4 TS1M6 | |
Microsoft® Windows® for x64 | 9.4_M6 | | 9.4 TS1M6 | |
z/OS 64-bit | 9.4_M6 | | 9.4 TS1M6 | |
z/OS | 9.4_M6 | | 9.4 TS1M6 | |
*
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.
The DBSERVER_MAX_BYTES=1 LIBNAME option might result in unexpected column lengths with PROC SQL.
Type: | Problem Note |
Priority: | high |
Topic: | SAS Reference ==> SQL Data Management ==> data management
|
Date Modified: | 2023-11-21 10:53:56 |
Date Created: | 2023-11-17 05:56:29 |