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

How many nodes supported by a one cpu in parallel jobs?

3 Answers   IBM,


I want capture UnMatched records from Primary source and secondary source in JOIN stage?

3 Answers   TCS,


What is the use of Row generator stage?

2 Answers  


how many stages are there in Datastage... Please clarify mee??

3 Answers  


What is the difference between lookup and sparse lookup?

1 Answers  






I have scenario like this seq file --> transformer --> sort stage --> dataset In this job which prtitioning technique you are using and why???

3 Answers   CTS, IBM,


What is the method of removing duplicates, without the remove duplicate stage?

0 Answers  


In Datastage, how you can fix the truncated data error?

0 Answers  


What is the diff between sort performed at sort stage and the stream sort performed at the input of few stages in DS Enterprise edition?

1 Answers  


How to get max salary of an organization using data stage stages........... can any body help me plz.......

7 Answers   Cap Gemini,


How to write a left outer join condition by using Transformer stage in server jobs? Could any one help me?

1 Answers  


what is main difference between change capture and change apply stages

4 Answers   IBM,


Categories