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 |
Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2
Can you explain repository tables in datastage?
Please explain me the difference between 3 types of slowly changing dimension in datawarehousing?
In work load management there are three options of Low priority, Medium priority and High Priority Jobs which can be used for resource management. why this feature is developed when there is already jobs prescheduled by scheduler or autosys. what will be the use of workload management then?
Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also
Source flat file contains src --- 1 2 ' ' ' 18 we had 3 targets T1 T2 T3 -- -- -- 1 4 7 2 5 8 3 6 9 10 13 16 11 14 17 12 15 18 How can i get? **Using only datastage, but not unix or any other. I am expecting the answer soon.. Thanks in advance.
what is factless fact table?
How to reverse the string using SQL?
Hi, i did what you mentioned in the answer, i.e. source- >Transformer -> 3 datasets. Iam able to see the data in datasets but its not sort order... Can you tell how sort the data?? i also checked Hash partition with performsort.
What are the prerequisites for join stage
How to LOG 'unmatched Master' records and 'Reject Updates' in log files using MERGE stage?
In aggregator stage,to find the sum of the entire group of columns,it displays in binary format. How can i solve this problem.