Filtering out records based on UNICODE values

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
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Filtering out records based on UNICODE values

Post by Inquisitive »

Hi,

We have a requirement to filter out Japanese languade address records from the source when we extract and process records.

Is there any we can eliminate these records based on UNICODE values in those fields?

Thanks
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

No sure but to identify an individual character outside of the standard Ascii you could try

Code: Select all

If input.field > Char(127) then 'Invalid' Else 'Valid'
Not had to do it before though.
Regards,

Nick.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Nick's code will not work if your input is a string. You need a recursive mechanism to check for ascii values if you want to go down that path.
Do you have NLS installed? If you view these characters at the OS level, how do they show up?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply