Consider Input file.txt as below
telephoneno
09700020075
919889110102
918571233668
Output.txt
telephoneno
09700020075
09889110102
08571233668 and length should be 11.If first two characters is "91" i need to replace as "0"
Ans:
In Transformer use following derivation
If (Len(InLink.Phone) = 11) Then InLink.Phone Else "0" : Right(InLink.Phone,10)
Common steps for Datastge Job Development:
1)Understand the requirement clearly and also exceptions
2)Form the algorithm in simple english and Do not go for Job development directly
Algorithm:
a)Check whether length of the string is 11 or not
b)If it 11 pass the input else extract right most 10 characters and append with zero
3)Now convert the Algorithm into Datastage stages
a)To implement first point in the Algorithm we need to use Len function and also If statement
b)To implement second point in the Algorithm we need to use Right function
4)In most of the cases requirement is Spilted into Jobs and we have to identity the stages used in each Job after forming the algorithm which makes you debugging easier instead of implementing entire requirement in one Job.
To identify when to use which stage the following link will help you-when-to-use-which-stage-in-datastage
5)Performance tuning if you are facing any problem which is an iterative approach.
6)Finally connect all the Jobs through Job sequence depends on Dependency because one Datastage Job output may depends upon the Input of other Datstage Job
Hi Vamsi , You are sharing good information about the updates on datastage. Your blog visitors can get some more info
ReplyDeleteDatastage Examples
Thanks....!!
ReplyDeletePost is understandable and useful for the people who refers for sap hana. Online services in IT Hub online Training
on Datastage Online Training
This is a such a great help. You helped me a lot indeed and reading this your article I have found many new and useful information about this subject. Datastage online training
ReplyDeleteThis is a such a great help. You helped me a lot indeed and reading this your article I have found many new and useful information about this subject. Datastage online training
ReplyDelete