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 |
1)How to do error handling in datastage? 2)Did sequential stage accepts .xl files ,xml? znd how?
How to create environments and call them? What is the use defined variables?
why do u need the IOS upgradation in a FC switch
What is the function in Transformer stage can act as Rank Function in oracle
How can we perform 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?
What are the functionalities of link partitioner and link collector?
Input Data is: Emp_Id, EmpInd 100, 0 100, 0 100, 0 101, 1 101, 1 102, 0 102, 0 102, 1 103, 1 103, 1 I want Output 100, 0 100, 0 100, 0 101, 1 101, 1 Means Indicator should either all ZEROs or all ONEs per EmpId. Impliment this using SQL and DataStage both.
How complex jobs are implemented in datstage to improve performance?
data stores in which location while using data set stage as the target?
What could be a data source system?
how can we generate row values like 1 1 1 2 2 2 3 3 3 using col generator plz let me know
1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only? How to write the sql query? 3)i have 40 rows,i want to display last row? write sql query?