Is there any function for converting single to double byte

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
RudreshEswarappa
Participant
Posts: 21
Joined: Wed Aug 29, 2007 1:33 am
Location: Bangalore
Contact:

Is there any function for converting single to double byte

Post by RudreshEswarappa »

Hi All,

I need to convert the Japanese characters Half Kana (Single Byte) to Full kana (Double Byte). My target is DB2. Is there any specific function in DataStage Server job to do this conversion???

Thanks in Advance

Regards

Rudresh
Rudresh Eswarappa
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you have NLS enabled then you can have DS do this automatically by defining the appropriate and correct mappings. Which Half-Kana representation are you using? (Don't some or many character sets actually have both representations defined? I seem to remember being able to choose representations when using IME)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What map is your single-byte kana? And what map is the multibyte one supposed to be?
RudreshEswarappa
Participant
Posts: 21
Joined: Wed Aug 29, 2007 1:33 am
Location: Bangalore
Contact:

Post by RudreshEswarappa »

Hi again,

Suppose I have a column with 5 japanese characters with Single byte kana (Katakana). That should be converted to 10 Japanese characters with double byte kana. I am not sure how it can be done in DataStage since there is no conversion function like that.

Can anyone help me out on this issue.


Thanks in Advance.

Regards

Rudresh
Rudresh Eswarappa
RudreshEswarappa
Participant
Posts: 21
Joined: Wed Aug 29, 2007 1:33 am
Location: Bangalore
Contact:

Post by RudreshEswarappa »

Is it possible to call Java program from DataStage Server Edition???


If possible, then i have a code which converts Single byte to double byte.

With that i can do this conversion


Regards

Rudresh
Rudresh Eswarappa
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

How about answering the questions first? If you wish to convert from single-byte to double-byte representations within the same character set you will need to use the CONVERT function.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

RudreshEswarappa wrote:Hi again,

Suppose I have a column with 5 japanese characters with Single byte kana (Katakana). That should be converted to 10 Japanese characters with double byte kana. I am not sure how it can be done in DataStage since there is no conversion function like that.

Can anyone help me out on this issue.


Thanks in Advance.

Regards

Rudresh
I disagree. Five characters encoded using any SBCS (single-byte character set) will - can - only generate five characters if encoded using a compatible DBCS (double-byte character set). It will take up twice as many bytes, typically, but will only be five characters.

Therefore, as Arnd indicated, you need to be aware of which SBCS - what you are calling "single byte kana" - is being used to encode these characters, then find an appropriate DBCS for encoding the same characters. There are many encodings available for Japanese characters, one of the most common being SHIFT-JIS (and even that has variations).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Common character sets, i.e. Shift-JIS, have both single and double byte representations of the kana characters. If you want to do this type of conversion it is a simple string manipulation; if you wish to change representations then you have an NLS issue.
RudreshEswarappa
Participant
Posts: 21
Joined: Wed Aug 29, 2007 1:33 am
Location: Bangalore
Contact:

Post by RudreshEswarappa »

Hi Again,

I couldnot able to do this. can you please explain briefly...


Thanks Adv

Rudresh
Rudresh Eswarappa
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What have you tried and what was the result? Specifically, what method did you use to convert a SBCS representation of a kana "ha" to a DBCS kana "ha"? Which encoding are you using?
Post Reply