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 we can convert rows to columns in datastage?
What is exact difference between Parallel Jobs and server Jobs..
how to define satge variables in transformer stage
What are the some differences between 7.x and 8.x version of datastage?
what is 'reconsideration error' and how can i respond to this error and how to debug this
i having source like emptable,dept table and combined purpose using for the join stage but join stage which partition techq will be prefored? pls given the ans?
What is process model?
what is set mapping in datastage??
HOW CAN U DO ERROR HANDLING IN DATA STAGE?
how does work server jobs?
Hi,can any one please mention list of dimension and fact tables for Sales and Distribution System for a Pharmacutical company.
hi, how would i run job1 then job 3 , then job2 in a sequence of job1 ,job2,job3. Thanks sunitha