New datatypes for Unicode support  Text and image data

Release Bulletin Mainframe Connect™ Server Option for IMS and MVS Version 12.6

Unicode support in the Server Option for IMS and MVS

The unichar, univarchar, and unitext datatypes have been added for Unicode support in the Server Option. These three datatypes are mapped to TDS_LONGBINARY with a user type of 34, 35, or 36, as shown in Table 3.

Table 3: Unicode datatype mappings

SQL datatype

TDS datatype

User type

Comment

unichar

TDS_LONGBINARY

34

Fixed-length UTF-16 data

univarchar

TDS_LONGBINARY

35

Variable-length UTF-16 data

unitext

TDS_LONGBINARY

36

UTF-16 encoded data

The Server Option has the following three datatypes to support unichar, univarchar, and unitext:

NoteCurrently, there is no special support for TDSUNITEXT.

The following API calls have been changed in the Server Option to accommodate support for Unicode:


TDPROPS

The TDPROPS API call maintains character set conversion properties.

Syntax

COPY SYGWCOB

01  TDSPROC            PIC S9(9) COMP.
01  RETCODE            PIC S9(9) COMP.
01  OPER               PIC S9(9) COMP.
01  PROPERTY           PIC S9(9) COMP.
01  VALUE              PIC S9(9) COMP.

CALL ‘TDPROPS’ USING TDSPROC RETCODE OPER PROPERTY VALUE.

Arguments

TDPROC – (I) Handle for this client-server connection.

RETCODE – (O) Variable where the result of function execution is returned.

OPER – (I) Value must be TDS-GET to retrieve the property specified by PROPERTY or TDS-SET to change the property specified by PROPERTY.

PROPERTY – (I). TDPROPS supports the following properties:

VALUE – (I) The value of the property specified in PROPERTY.

NoteFor a connection established with the UTF-8 character set, the default values for the TDS_CLIENT_CCSID, TDS_SERVER_CCSID, TDS_PROG_CCSID, and TDS_DATA_CCSID parameters are 1208, 1208, 500, and 500, respectively.

TDPROPS may specify values for these properties any time after a connection has been established. The default values for these properties depend on the character set established for the connection at login.

NoteThe Server Option does not reset any CCSID property values set by an application program. Once an application changes a CCSID property value, the setting remains for all API calls until it is reset by the application.

Example 1

TDS_PROG_CCSID is set to 1208 (UTF-8), and both TDS_SERVER_CCSID and TDS_CLIENT_CCSID default to 1208. The server application program calls TDRCVPRM.

Example 2

TDS_PROG_CCSID is set to 1025 (Russian EBCDIC, CCSID=1025), and both TDS_SERVER_CCSID and TDS_CLIENT_CCSID default to 1208. The application calls TDRCVPRM:

Example 3

TDS_PROG_CCSID is set to 939 (Japanese EBCDIC, CCSID=939), and both TDS_SERVER_CCSID and TDS_CLIENT_CCSID default to sjis (CCSID=943). The application calls TDRCVPRM:


TDESCRIB

The TDESCRIB API call now allows use of the TDSUNICHAR, TDSUNIVARCHAR, and TDSUNITEXT datatypes.

Table 4 lists new datatype conversions supported.

Table 4: New datatype mappings

Datatype

Datatype

TDSCHAR

TDSUNICHAR

TDSCHAR

TDSUNIVARCHAR

TDSCHAR

TDSUNITEXT

TDSVARCHAR

TDSUNICHAR

TDSVARCHAR

TDSUNIVARCHAR

TDSTEXT

TDSUNITEXT





Copyright © 2005. Sybase Inc. All rights reserved. Text and image data

View this release bulletin as PDF