Validate the string if in English

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
bakshdwh
Participant
Posts: 12
Joined: Fri Sep 19, 2008 7:56 am
Location: bangalore
Contact:

Validate the string if in English

Post by bakshdwh »

Dear All

I'm trying to validate a string, which has arabic and English data in it..

If the data is in Arabic then pass '' else pass the column as is..
Could you'll pls help in this case.

Tried Alnum/Alpha, but doesn't work
CHeers
Baksh
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

svIsEnglish <-- (Convert("ABCDEFGHIJKLMNOPQRSTUVWXYZ ,.'-", "", UpCase(InLink.TheString)) = "")
Convert all English characters, including punctuation, into "" then see if there's any characters remaining.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bakshdwh
Participant
Posts: 12
Joined: Fri Sep 19, 2008 7:56 am
Location: bangalore
Contact:

Post by bakshdwh »

Thanks
This really helped..

Appreciated.. thanks again
CHeers
Baksh
Post Reply