How to filter the records which contains special chars

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
ds@tcs
Participant
Posts: 24
Joined: Thu Mar 17, 2011 6:26 am
Location: chennai
Contact:

How to filter the records which contains special chars

Post by ds@tcs »

I have source data like

colname
-----------
aaaaaa
bbb*bb
ccc/ccc
ddd+dd
eeeeee

out put should be like

Code: Select all

col1        col2
----        ---------
aaaaaa      bbb*bb
eeeeee      ccc/ccc
            ddd+dd
means the records which contains special characters need to send in different column

can any bodyhelp in this
Regards
Sankar
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Use convert/index function to find whether the input contains any special characters.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Using IsAlpha() might be easier.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds@tcs
Participant
Posts: 24
Joined: Thu Mar 17, 2011 6:26 am
Location: chennai
Contact:

Post by ds@tcs »

ray.wurlod wrote:Using IsAlpha() might be easier. ...
Can u explain in clear
Regards
Sankar
nareshketepalli
Participant
Posts: 36
Joined: Mon Jun 28, 2010 11:24 pm
Location: seepz

Post by nareshketepalli »

In transformer stage we have a fuction like

Alpha(colname).

Write the above function in constraints.so u can get ur output.


Thanks,
NARESHKUMAR
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSXchange is not a mobile phone. Will you please stop using SMS-style abbreviations?!

Yes, the function is Alpha(), not IsAlpha(). It returns a true/false value depending on whethe the string consists wholly of alphabetic characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply