Author Topic: Double byte character sets (DBCS)  (Read 2104 times)

mburnham

  • Guest
Double byte character sets (DBCS)
« on: January 03, 2018, 06:14:10 AM »
Hi,

I have a client who wants to index Japanese characters.  We have a Unicode database:

$ db2 get db config |grep -i code
 Database code page                                      = 1208
 Database code set                                       = UTF-8
 Database country/region code                            = 1

I can manually update a row with double byte characters and looking at a query, DB2 seems fine :

$ db2 "select SEARCH_ATTRIBUTE_1, SEARCH_ATTRIBUTE_2 from tvb1 where doc_name = '9FAAA'"

SEARCH_ATTRIBUTE_1                                 SEARCH_ATTRIBUTE_2
-------------------------------------------------- --------------------------------------------------
あ                                                ああ

  1 record(s) selected.

However, OnDemand isn't inserting these characters correctly:

$ db2 "select SEARCH_ATTRIBUTE_1, SEARCH_ATTRIBUTE_2 from tvb1 where doc_name = '14FAAA'"

SEARCH_ATTRIBUTE_1                                 SEARCH_ATTRIBUTE_2
-------------------------------------------------- --------------------------------------------------
▒▒▒▒▒                                           ▒▒▒▒

  1 record(s) selected.

I'm using an index file that looks like this:

CODEPAGE:954
COMMENT:-----   Checklist pdf Report 2017/07/19 for CBV_CHECKLIST --------------
GROUP_FIELD_NAME:Production_Date
GROUP_FIELD_VALUE:2017/12/20
GROUP_FIELD_NAME:System_DateTime
GROUP_FIELD_VALUE:2017/12/20
GROUP_FIELD_NAME:Report_Description
GROUP_FIELD_VALUE:Checklist Report CODEPAGE 932
GROUP_FIELD_NAME:Report_ID
GROUP_FIELD_VALUE:CBV_CHECKLIST
GROUP_FIELD_NAME:Job_Name
GROUP_FIELD_VALUE:Checklist_Process
GROUP_FIELD_NAME:CHECKLIST_CREATOR
GROUP_FIELD_VALUE:bernie
GROUP_FIELD_NAME:search_attribute_1
GROUP_FIELD_VALUE:あ
GROUP_FIELD_NAME:search_attribute_2
GROUP_FIELD_VALUE:ああ
GROUP_FIELD_NAME:search_attribute_3
GROUP_FIELD_VALUE:冬の日
GROUP_FIELD_NAME:search_attribute_4
GROUP_FIELD_VALUE:
GROUP_FIELD_NAME:search_attribute_5
GROUP_FIELD_VALUE: example text 5
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:/var/tmp/japanese/7years_d4ECIN1-EeamXABQVgGNrwA.ard.out

I've tried setting the codepage to 954 (IBM suggested) and some other values - no luck.

There are other issues doing queries with the CMOD Windows client (9.5.0.x) but these may be Windows-related language settings.

Has anyone gotten this to work?  IBM tells me double-byte characters have been supported in CMOD for 20 years, but can't tell me how to do this.  :P

Thanks much in advance,

Mark


Nolan

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Re: Double byte character sets (DBCS)
« Reply #1 on: January 03, 2018, 06:23:44 AM »
J.

#zOS #AIX #Windows #Multiplatforms
#DB2 #TSM #ODF #zODF #ODWEK
#CapacityPlanning #AFP #ReportDistribution
#Finance #ICN

Steve Bechtolt

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Double byte character sets (DBCS)
« Reply #2 on: February 02, 2018, 04:49:09 AM »
In your index file, set CODEPAGE:1208
Steve Bechtolt
IBM Certified Solutions Expert - IBM Content Management - OnDemand Multiplatform
ERM as a Service - DXC Technology