Replace value in parallal jobs

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
A_SUSHMA
Participant
Posts: 43
Joined: Fri Apr 12, 2013 10:34 am

Replace value in parallal jobs

Post by A_SUSHMA »

I have one requirment.

My input is

telephoneno
09700020075
919889110102
918571233668

i want ouput is

telephoneno
09700020075
09889110102
08571233668 and length should be 11.If first two characters is "91" i need to replace as "0" in parallal jobs.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Assuming that the data type of Phone is string (of some kind):

Code: Select all

If (Len(InLink.Phone) = 11) Then InLink.Phone Else "0" : Right(InLink.Phone,10)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
A_SUSHMA
Participant
Posts: 43
Joined: Fri Apr 12, 2013 10:34 am

Post by A_SUSHMA »

Hi Ray,

Thank you for your reply.

In some times my telephone length is morethan 11 degitis
like 9198765432110254

In this example i want output 09876543211 and just ignore after 11 digits
As per your reply i am getting output is 06543211025.
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

1)Extract first two characters and check whether it is 91. If it is 91 extract n-2 right most characters and append with 0

Use string functions,if clausesub string operator
Thanks and Regards
Vamsi krishna.v
http://datastage-vamsi.blogspot.in/
Post Reply