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



My source having following data as below, AB1 Aim2 Abnv5 1An8bx and my question is i need the ..

Answer / d

Str('0',6-Len(string)): string

Is This Answer Correct ?    17 Yes 0 No

My source having following data as below, AB1 Aim2 Abnv5 1An8bx and my question is i need the ..

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

My source having following data as below, AB1 Aim2 Abnv5 1An8bx and my question is i need the ..

Answer / subbuchamala

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

My source having following data as below, AB1 Aim2 Abnv5 1An8bx and my question is i need the ..

Answer / reddymkl.dwh

right(str("0",3):source_data,3)

Is This Answer Correct ?    0 Yes 0 No

My source having following data as below, AB1 Aim2 Abnv5 1An8bx and my question is i need the ..

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

My source having following data as below, AB1 Aim2 Abnv5 1An8bx and my question is i need the ..

Answer / prasu

right(str(0,3)':'source data),6)

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Data Stage Interview Questions

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

0 Answers  


Can you explain repository tables in datastage?

0 Answers  


Please explain me the difference between 3 types of slowly changing dimension in datawarehousing?

3 Answers   TCS,


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?

0 Answers  


Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

0 Answers  






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.

7 Answers  


what is factless fact table?

3 Answers   IBM,


How to reverse the string using SQL?

0 Answers   CTS,


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.

1 Answers   CGI,


What are the prerequisites for join stage

2 Answers  


How to LOG 'unmatched Master' records and 'Reject Updates' in log files using MERGE stage?

1 Answers   TCS,


In aggregator stage,to find the sum of the entire group of columns,it displays in binary format. How can i solve this problem.

1 Answers   IBM,


Categories