Logic Help

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
phanikumar
Participant
Posts: 60
Joined: Tue Sep 20, 2011 10:44 pm
Location: INDIA

Logic Help

Post by phanikumar »

Hi,

I am trying to find a solution to implement the following logic in Datastage

regexp_like(upper(POSTAL_CODE), '^S[0-9][0-9][0-9]$')

from the above line I can find the starting value of column, but how can I find the end value in a column.

Any suggestions would be greatly helpful.

Thanks

Kumar
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(InLink.String) = 4) And (Left(InLInk.String,1) = "S") And IsValid("integer",Right(InLink.String,3))
Or, if (when) you have the Data Rules stage (version 8.7 or later) you can test using a direct matches_regex rule.
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