SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 16589: Missing or dropped Sybase VARCHAR or CHAR column if the length is larger than 255

DetailsHotfixAboutRate It

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

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to Sybase64-bit Enabled HP-UX9.1 TS1M39.1 TS1M3 SP4
Linux9.1 TS1M39.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M39.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M39.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M39.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.