Looping Logic in Datastage 9.1 for Email Address Validation

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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Okay.

You might want to start with letting us know the specifics of what kind of help you need. Questions are always good, too. :wink: Otherwise these just tend to turn into a bunch of stage variables as you check each rule one by one and then aggregate the results.

I'll also add my two cents, having been tasked with things like this in the past, that even if all of your rules pass that doesn't mean the email address is valid. Properly formatted, perhaps, but not necessarily a "real" address. As an alternative, you might want to consider one of the many email validation services out there, a number of which are free it would seem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you have an Information Analyzer license you can use the Data Rules stage to validate a single email address using the matches_regex check, far more comprehensively than your posted algorithm.

Otherwise, set up a heap of stage variables to split the two addresses, store the results of validating them, and making the decision about which to transfer to output.

For more than two, process using a loop and loop variables, rather than stage variables.

Tedious, but do-able.
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