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 |
i have one table with one column in this column i have three rows like 1,1,2 then that rows populate to target as first tow rows as one row and remaing row as one row how it posible? COLUMN_NAME SHIVA RAMU MADHU THEN I WANT TO LIKE SHIVA AND RAMU IN ONE ROW AND MADHU IS ONE ROW IF ANY ONE KNOW PLZ TELL ME
I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2 2 Output3: 3 i.e. same duplicates should be in one target, other duplicate values should be in another target and so on.. Pls help
when U have a remove dublicate option in sort stage, why we have a remove dublicate stage in PX, thought it is recamended to sort data before using a remove dublicate stage. I hae been thinking this from days....
How can one find bugs in job sequence?
Can you explain repository tables in datastage?
Please Tell me..,I need some Complex Jobs in datastage as per in interview?how to tell and how to explain?please send as well as posiible please
i have source data like empno,enmae 11 ,aa 12 ,bb i want output like empno,ename 11 ,aa 12 ,bb 11 ,aa 12 ,bb
How we can convert rows to columns in datastage?
what is factless fact table?
What all the types of jobs you developed?
how can i abort the job if i get more than 100 errors in job log?
How to initialize environment variables?