How to find any one of characters in a string?

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
horserider
Participant
Posts: 71
Joined: Mon Jul 09, 2007 1:12 pm

How to find any one of characters in a string?

Post by horserider »

Hello,

I have a parallel job. In the transformer, all I need to check if my first column of the source which is 1 character long contains any 1 these character ( any number from 1 -10, or any letter A - Z).

If the column has any other character other than above, I want to simply reject the row.

Is there any function that checks for multiple characters in a string?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, but if you convert all of those to "" and check the length of the remainder you have a solution.
Your constraint expression would have the form

Code: Select all

Len(Convert("ABCDEFGHIJKLMNOPQRSTUVWXYZ","",InLink.TheString)) = 0
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