Storing Japanese characters into a DB2 table



IBM's flagship relational database management system

Storing Japanese characters into a DB2 table

Postby kapra75 » Wed Feb 16, 2011 3:02 pm

Hi

We have a requirement to store Japanese characters into a Db2 table.

How we can insert Japanese characters into a DB2 table using a COBOL-DB2 program?

I would like to know the procedure from start to end. I went through IBM documentation but it was too complicated for me to understand.

As a developer, what is the procedure to insert Japanese characters into a Db2 table using COBOL-DB2 program?

thanks
KP
kapra75
 
Posts: 3
Joined: Mon Jan 17, 2011 11:19 am
Has thanked: 0 time
Been thanked: 0 time

Re: Storing Japanese characters into a DB2 table

Postby GuyC » Wed Feb 16, 2011 6:46 pm

Where do the japanese characters come from ? a file, a screen, ....
Do you have a unicode DB2 table ?
how hard can it be :

set column Col1 to 日本
01 Y pic N(10) usage national.
. . .
    Move NX"65E5 672C" to Y

    exec sql update table1 set Col1 = :Y where ...
    end-exec
I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: Storing Japanese characters into a DB2 table

Postby kapra75 » Thu Feb 17, 2011 3:37 pm

Thanks for the response.

The Japan chars come from a file. We dont have a Unicode Db2 table yet.

can we create a database like this?
CREATE DATABASE dbname USING CODESET IBM-932 TERRITORY JP
are the codeset IBM-932 and territory JP correct? We are using Z/OS operating system.

How to create a sample Unicode table?
kapra75
 
Posts: 3
Joined: Mon Jan 17, 2011 11:19 am
Has thanked: 0 time
Been thanked: 0 time

Re: Storing Japanese characters into a DB2 table

Postby NicC » Thu Feb 17, 2011 4:00 pm

I do not know so I would first check the manual for correct syntax and then try the command under SPUFI.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Storing Japanese characters into a DB2 table

Postby GuyC » Thu Feb 17, 2011 9:43 pm

your database doesn't matter. it is your tablespace

the CCSID of the database is only a default

CREATE TABLESPACE tsxxx IN dbxxx CCSID UNICODE
CREATE TABLE tbxxx ... IN dbxxx.tsxxx


I don't know how you would tell in JCL or in COBol the input is in a certain codepage
I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post