Open Client has three character types, CS_CHAR, CS_LONGCHAR, and CS_VARCHAR:
CS_CHAR corresponds to the Adaptive Server types char and varchar. That is, Client-Library interprets both the server char and varchar types as CS_CHAR. For example, ct_describe returns CS_CHAR_TYPE when describing a result column that has the server datatype varchar.
CS_LONGCHAR does not correspond to any Adaptive Server datatype, but some Open Server applications may support CS_LONGCHAR. An application can call ct_capability and check the CS_DATA_LCHAR capability to determine whether an Open Server connection supports CS_LONGCHAR. If it does, then ct_describe can return CS_LONGCHAR when describing a result data item. A CS_LONGCHAR value has a maximum length of 2,147,483,647 bytes.
CS_VARCHAR does not correspond to any Adaptive Server type. For this reason, Open Client routines do not return CS_VARCHAR_TYPE. CS_VARCHAR is a structure provided to enable non-C programming language veneers to be written for Open Client. It holds a string and its length:
typedef struct_cs_varchar
{
CS_SMALLINT len;
CS_CHAR str[CS_MAX_CHAR];
} CS_VARCHAR;
Typical client applications do not use CS_VARCHAR.