Is the Char function valid

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Obiwon666
Participant
Posts: 22
Joined: Wed Jan 17, 2007 5:34 am

Is the Char function valid

Post by Obiwon666 »

Hi everyone,

I've got in a string column a weird character (0x96, 150 in decimal) which cause some trouble, so i try to eliminate this by using Convert function in a stage transformer.
I define a derivation like this:
final_column=Convert(Char(150),"-",original_column)

The result string(final_column) contains allways the weird character and space character (ascii code 32) are replaced by the '-' character(ascii code 53).
So i create a new column in my transformer, char(1),(special_char=Char(150)) to see the character.
It shows the space character, but when i use Seq function on this column, i've got the value 150.

I develop an another job which use generator to create column with contains the weird character [value='\x96'] and it's work.

Do you an idea why Char function do that?
I don't understand why i have this behavior.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try this variation:

Code: Select all

Char(150,1)
The second argument asserts that the high order bit can be set.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Obiwon666
Participant
Posts: 22
Joined: Wed Jan 17, 2007 5:34 am

Post by Obiwon666 »

The job don't compile with this call, the stage transformer doesn't want this. Do i have to add something to call the char function with two arguments?

So i find an workaround for my business case which consist to do the same thing in database when i extract data, directly in the query.
Post Reply