Problem Note 16589: Missing or dropped Sybase VARCHAR or CHAR column if the length is larger
than 255
The following message is issued indicating that a column is an unsupported data type when referencing a Sybase table with a VARCHAR column larger that 255 and the column is dropped from the table.
NOTE: The following 1 column(s) in TEST.testvarchar have been automatically dropped because they have a datatype that is not supported by this engine: var1
With Sybase 11, the limitation was 1-255 for the VARCHAR data type. With Sybase 12, the limitation was increased to 32k-1.
The symptoms are when creating the library and viewing it in SAS® Explorer or SAS® Management Console the table exists but the column is missing. In linemode or interactive SAS just printing the table issues the message.
The column should not get dropped and the documentation needs to be modified to state a field length greater than 255 will default to a $255 format. What should happen is that the column should be truncated not dropped.
To replicate:
unix_prompt> isql -Uuser -Ppassword -Sserver
1> create table testvarchar (var1 varchar(400))
2> go
1> quit
unix_prompt> ./sas -nodms
1? libname test sybase user=dbitest password=xxxxxx server=ASE_125;
NOTE: Libref TEST was successfully assigned as follows:
Engine: SYBASE
Physical Name: ASE_125
2? proc print data=test.testvarchar; run;
ERROR: Error trying to read from a DBMS table. At least one column
must be selected.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The following 1 column(s) in TEST.testvarchar have been
automatically dropped because they have a datatype that is not
supported by this engine: var1
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.07 seconds
cpu time 0.06 seconds
3?
With Sybase ASE 12.5, the CHAR and VARCHAR type length was increased from a maximum of 255 bytes to a maximum of slightly less that the database page size (can be up to about 8K). Sybase Open Client is returning a new data type code for any CHAR or VARCHAR column defined with a length of over 255, instead of just retuning the normal data type code for CHAR or VARCHAR.
To resolve this problem, apply the HOTFIX which will incorporate the new data type in the SAS/ACCESS Interface to Sybase.
Select the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Sybase | 64-bit Enabled HP-UX | 9.1 TS1M3 | 9.1 TS1M3 SP4 |
Linux | 9.1 TS1M3 | 9.1 TS1M3 SP4 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.1 TS1M3 SP4 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.1 TS1M3 SP4 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.1 TS1M3 SP4 |
*
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: | SAS Reference ==> LIBNAME Engines Data Management ==> Data Sources ==> External Databases ==> Sybase
|
Date Modified: | 2005-12-09 13:46:25 |
Date Created: | 2005-11-29 11:02:51 |