My source having following data as below,
AB1
Aim2
Abnv5
1An8bx
and my question is i need the Datastage job the following
as in my target
000AB1
00Aim2
0Abnv5
1An8bx
Please help me to achive this.
Answers were Sorted based on User's Feedback
Answer / venkata ramana
Input Seq file:
CodeName
AB1
Aim2
Abnv5
1An8bx
Note: Column(CodeName) lenth is 6
Seq-->Transformar--DataSet
Trasformar:-
In Derivation cell:
Str('0',6 - Len(DSLink3.CodeName)):DSLink3.CodeName
Out put Dataset:-
000AB1
00Aim2
0Abnv5
1An8bx
Is This Answer Correct ? | 3 Yes | 0 No |
In the Output Column Derivation of Transformer Stage:
1. Way:
Str('0',6-Len(string)): Input_Col--->Output_Col
2. Way:
right("000000" : Input_Col),6) --->Output_Col
3. Way:
Right(Str("0",6) : Input_Col),6) --->Output_Col
Right(Str("0",3) : Input_Col),6) --->Output_Col
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / deepak patel
Hey,
You can simply draw output link to next outfile and set column name Datatype varchar and size to 6 and in output file you will get desired output.
Is This Answer Correct ? | 0 Yes | 2 No |
How many nodes supported by a one cpu in parallel jobs?
I want capture UnMatched records from Primary source and secondary source in JOIN stage?
What is the use of Row generator stage?
how many stages are there in Datastage... Please clarify mee??
What is the difference between lookup and sparse lookup?
I have scenario like this seq file --> transformer --> sort stage --> dataset In this job which prtitioning technique you are using and why???
What is the method of removing duplicates, without the remove duplicate stage?
In Datastage, how you can fix the truncated data error?
What is the diff between sort performed at sort stage and the stream sort performed at the input of few stages in DS Enterprise edition?
How to get max salary of an organization using data stage stages........... can any body help me plz.......
How to write a left outer join condition by using Transformer stage in server jobs? Could any one help me?
what is main difference between change capture and change apply stages