coding

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
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

coding

Post by raji33 »

Hi All,

can anyone help me with the situation.

i have input as seq file and their is colmn email id
and output is also a seq file and reject file is also seq file:

Code: Select all

Seq------trans-----seq(target)
             \
              \(reject)
               \seq

ex:
roxy123@gmail.com(pass)
roxy123@gmail..com(reject)
roxy 123@gmail.com(reject)
and email address between 7 to 70 charaters should pass otherwise if less then 7 and greater than 70 should get rejected

how should i write the constraint


Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Set up boolean stage variables, one for each check, using functions like Count() and then the constraint would reference them:

Code: Select all

svOneDot:    Count(YourField,".") = 1
svNoSpace:   Count(YourField," ") = 0
svLength:    Len(YourField)
svLengthOK:  svLength >= 7 and svLength <= 70

Contraint:   svOneDot and svNoSpace and svLengthOK
Double-check the function syntax, that's off the top of my head and it is very early in the morning. Here. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

Hi Chulett,

Iam anable to see complete message can you please paste the complete message.

Thanks
Raji
arunpramanik
Participant
Posts: 63
Joined: Fri Jun 22, 2007 7:27 am
Location: Kolkata

Post by arunpramanik »

raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

Thanks alot Arun
Post Reply