How do I find garbage/control characters within a column?

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
mohanraj
Participant
Posts: 48
Joined: Sat Mar 25, 2006 12:40 am
Location: bangalore

How do I find garbage/control characters within a column?

Post by mohanraj »

In a Server job I wish to ensure that there are no garbage characters in the field. How would I do that?

(Item modified by the Administrator)
Last edited by mohanraj on Wed Mar 26, 2008 4:53 am, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Len(Oconv(Oconv(InLink.TheInput,"MC/A"),"MC/N")) > 0
One Oconv() removes all alphabetic characters, the other removes all numeric characters. Anything left over is non alphanumeric.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

h?
-craig

"You can never have too many knives" -- Logan Nine Fingers
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

i.
dinthat
Participant
Posts: 22
Joined: Tue Sep 25, 2007 8:43 am
Location: Kingdom of Saudi Arabia

Post by dinthat »

j :)
Thanks And Regards,
dinthat
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What was the question again. Why would anyone get a reply with the code and then clear the question :evil:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

DSguru2B wrote:What was the question again. Why would anyone get a reply with the code and then clear the question :evil:
Unwillingness on the OP's part to recognize the fact that he/she had to take help for a "trivial" matter, perhaps!!!! :roll: :roll:



Its this kind of attitude that annoys me. When all of us are here to exchange knowledge, there are some that get what they want from here, but are unwilling to share it with the rest of the forum community. Further, the choice of the subject name 'g' shows the OPs intention.:evil: :evil:
gateleys
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

Thanks Administrator.... for updating the OP's initial post (which he had deleted after he got an answer), and the 'subject' item (which he had put as 'g').

And someone else has to clean up the mess!!!
gateleys
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you replace "garbage" with "non-alphanumeric" you pretty much have the original question - how to remove non-alphanumeric characters from a string.

A later reply from the OP indicated that he (she?) would try what I suggested.

That the thread is marked as resolved suggests that it works.
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