Search in 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
koolsun85
Participant
Posts: 36
Joined: Tue Jun 15, 2010 3:30 pm
Location: Tampa

Search in column.

Post by koolsun85 »

There is a situation where i need to allow only alpha, numeric and a hyphen in a particular column . If i found out any other character i have to reject the entire record.

how to acheive this.. Need help on this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a constraint experession using Convert() function to detect the existence of any other characters. Something like the following would suffice:

Code: Select all

Convert("0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", UpCase(InLink.TheString)) = ""
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
koolsun85
Participant
Posts: 36
Joined: Tue Jun 15, 2010 3:30 pm
Location: Tampa

Post by koolsun85 »

I couldn't see the full content. Can you allow to watch the premium content.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Certainly. Check this link for details.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
koolsun85
Participant
Posts: 36
Joined: Tue Jun 15, 2010 3:30 pm
Location: Tampa

Post by koolsun85 »

Thanks a lot ray. It worked. :)
Post Reply