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

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

3 Answers   Cap Gemini,


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

9 Answers   IBM,


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....

4 Answers   Target,


How can one find bugs in job sequence?

0 Answers  


Can you explain repository tables in datastage?

0 Answers  






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

1 Answers   Systime,


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

7 Answers   TCS,


How we can convert rows to columns in datastage?

4 Answers   IBM,


what is factless fact table?

3 Answers   IBM,


What all the types of jobs you developed?

0 Answers  


how can i abort the job if i get more than 100 errors in job log?

6 Answers   Accenture,


How to initialize environment variables?

4 Answers   Infosys,


Categories