![]() | ![]() |
Home |
|
|
Access Service User's Guide DirectConnect for AS/400 |
|
| Chapter 2 Configuring the DirectConnect Access Service Library |
|
| Access service required properties |
|
| DefaultTargetCodeset |
Specifies the target CCSID or code set the access service uses to convert characters when it sends data to the target database.
DefaultTargetCodeset=targetcodeset
1-255 characters
No default
The DefaultTargetCodeset value should match the effective CCSID of AS/400 users, defined by the QCCSID system value, unless the CCSID of a specific user profile overrides it.
For information about CCSIDs, see the AS/400 DB2/400 SQL Reference and the IBM National Language Design Guide, Vol. 2.
When data passes from the target database to the client application, the access service converts the data from the DefaultTargetCodeset to the DefaultClientCodeset. (See "DefaultClientCodeset" .)
The DefaultTargetCodeset property enables the access service to support single-byte, double-byte, or mixed-byte language machines.
For single-byte language machines, you specify the single-byte CCSID as the only argument. Use the IBM CCSID number, not the code page or character set number. The CCSID value is the CCSID defined by the AS/400 system value, QCCSID.
For example, if the QCCSID value is 65535, specify the language CCSID as the targetcodeset. Look at the AS/400 system value, QCHRID, to determine the CCSID to use for the targetcodeset.
For mixed-byte language machines, specify three CCSIDs separated by commas for the targetcodeset:
The first CCSID is the mixed-byte CCSID.
The second CCSID is the associated single-byte CCSID.
The third CCSID is the associated double-byte CCSID.
Use the QCCSID system values to determine the CCSIDs to use for the targetcodeset. If the QCCSID is 65535, use the QCHRID system value for the targetcodeset value.
To ensure that the access service returns data inserted into a table in the proper code set, use the same code set for both the insert and select operations. For example, if you insert an exclamation point character ("!", ASCII 0x21) where the ASCII to EBCDIC conversion is based on code page 37, this byte is converted to 0x5A for storage on the target database. If you later select this data using code page 500 as your target code set (DefaultTargetCodeset value is 500), the 0x5A is converted to a right square bracket ("]", ASCII 0x5D). Therefore, always select data in the same code set in which it was inserted.
For a list of DefaultTargetCodeset values, see Table B-12 .
For single-byte language machines:
If the QCCSID is 65535 and the machine is configured with French as the primary language (QCHRID=297), use the French CCSID of 297 as the targetcodeset:
DefaultTargetCodeset=297
If the QCCSID is 65535 and the machine is configured with U.S. English as the primary language (QCHRID=37), use the U.S. English CCSID of 37 as the targetcodeset:
DefaultTargetCodeset=37
For mixed-byte language machines:
If the QCCSID system value is 65535 and the machine is configured with Katakana as the primary language, use the following three CCSIDs separated by commas as the targetcodeset:
DefaultTargetCodeset=5026, 290, 4396
where:
5026 is the mixed-byte Katakana CCSID.
290 is the associated single-byte CCSID.
4396 is the associated double-byte CCSID.
For English/Japanese machines, use the following CCSIDs for the targetcodeset:
DefaultTargetCodeset=5035, 1027, 4396
where:
5035 is the mixed-byte Japanese-English CCSID.
1027 is the associated single-byte CCSID.
4396 is the associated double-byte CCSID.
|
|