Open ServerConnect supports a subset of Client-Library and DB-Library™ datatypes. Table 2-9 lists those datatypes and their Gateway-Library equivalents.
Open ServerConnect datatype and COBOL data descriptions |
Client-Library/C and DB-Library datatypes |
Datatype descriptions |
---|---|---|
TDSBINARY
|
CS_BINARY DBBINARY |
Fixed binary type. No translations are performed on this datatype. |
TDSCHAR
|
CS_CHAR DBCHAR |
1- to 255-byte fixed character type. TDSCHAR can be used to represent Japanese characters as well as alphabetic characters. |
TDSDATETIME
|
CS_DATETIME DBDATETIME |
8-byte datetime datatype. The number of days since 1/1/1900, and the number of 300ths of a second since midnight. |
TDSDATETIME4
|
CS_DATETIME4 DBDATETIME4 |
4-byte datetime datatype. The number of days since 1/1/1900, and the number of minutes since midnight. |
TDSFLT4
|
CS_REAL DBREAL |
4-byte single precision type. |
TDSFLT8
|
CS_FLOAT DBFLT8 |
8-byte double precision type. |
TDSGRAPHIC
|
(Not applicable) |
1- to 127-character fixed character type. Used at the mainframe only to represent Japanese double-byte characters. |
TDSIMAGE
|
CS_IMAGE DBIMAGE |
Sybase image datatype. A variable-length field that can hold from 0 to 2,147,483,647 bytes of binary data. This is a Sybase datatype and can be used only with column data being returned to Sybase clients. |
TDSINT2
|
CS_SMALLINT DBSMALLINT |
2-byte integer. Can be declared as numeric or character. When declared as numeric, it has a maximum value of 65,525. |
TDSINT4
|
CS_INT DBINT |
4-byte integer. Can be declared as numeric or character. When declared as numeric, it has a maximum value of 2,147,483,648. |
TDSLONGVARBIN
|
CS_LONGBINARY |
Long variable binary. The default maximum length for this datatype is 32K. Does not include the 2-byte (“LL”) length specification prefix. No translations are performed on this datatype. |
TDSLONGVARCHAR
|
CS_LONGCHAR |
Long variable character type. The default maximum length for this datatype is 32K. Does not include the 2-byte (“LL”) length specification prefix. |
TDSMONEY
|
CS_MONEY DBMONEY |
8-byte double precision type. The range of legal values for this datatype is: -$922,337,203,685,477.5807 to +$922,337,203,685,477.5807. Note: This datatype can be used with client data only. |
TDSMONEY4
|
CS_MONEY4 DBMONEY4 |
4-byte double precision type. The range of legal values for this datatype is: -$214,748.3648 to +$214,748.3647 Note: This datatype can be used with client data only. |
TDSNUMERIC
|
CS_NUMERIC |
Numeric type. Support for numbers with: Precision – the precision of the numeric value (1 to 77, default 18). Scale – the scale of the numeric value (0 to 77, default 0). Note: This is a Sybase datatype. This datatype can be used for client data only. |
TDS-PACKED-DECIMAL
01 |
CS_PACKED370 |
IBM/370 packed decimal type. 31-byte precision is supported. Note: This is a mainframe datatype and can be used for mainframe data only. |
TDS-SYBASE-DECIMAL
|
CS_DECIMAL |
Decimal type. Support for numbers with: Precision – the precision of the numeric value (1 to 77, default 18). Scale – scale of the numeric value (0 to 77, default 0). Note: This is a Sybase datatype. This datatype can be used for client data only. |
TDSTEXT
|
CS_TEXT DBTEXT |
Sybase text datatype. A variable-length field that can hold from 0 to 2,147,483,647 bytes of binary data. This is a Sybase datatype, and can be used only with column data being returned to Sybase clients. |
TDSVARYBIN
|
CS_VARBINARY DBVARYBIN |
1- to 255-byte variable binary type. The field length is stored in a 2-byte (“LL”) prefix, as in DB2. No translations are performed on this datatype. |
TDSVARYCHAR
|
CS_VARCHAR DBVARYCHAR |
1- to 255-byte variable character type. The field length is stored in a 2-byte (“LL”) prefix, as in DB2. TDSVARYCHAR can be used to represent Japanese characters as well as alphabetic characters. |
TDSVARYGRAPHIC |
(Not applicable) |
1- to 255-byte graphic datatype. Used to represent Japanese double-byte characters. The field length is stored in a 2-byte (“LL”) prefix, as in DB2. Note: This is a mainframe datatype and can be used with mainframe data only. |
TDSVOID |
(Not applicable) |
NULL or nonexistent parameter. Used to denote parameters omitted in stored procedures. For example, in the following RPC: exec rpc a, b, , d, e The missing c parameter is represented as TDSVOID. No translations are done on this datatype. |
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |