Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


in one scenario source flat file like
Fileld1
00122001550056200568
00256002360014500896
00123004560078900258
00147004560025800256
divide each 5 numbers as one column i.e
here i need
field1 field2 field3 field4
00122 00155 00562 00568
00256 00236 00145 00896
00123 00456 00789 00258
00147 00456 00258 00256
plz help me....

Answers were Sorted based on User's Feedback



in one scenario source flat file like Fileld1 00122001550056200568 00256002360014500896 00123004..

Answer / vs

First and foremost thing, put the following data in a text file.

00122001550056200568
00256002360014500896
00123004560078900258
00147004560025800256

Follow the steps:

Take following 3 stages:

1. Sequential File
2. Transformer
3. Dataset/Sequential File

STAGE 1:

1. Sequential File Properties

Source-->File = browse & select the text file containing the
above data.
Read Method = Specific File(s)

Go to Columns Tab:
Give column name (any name), SQL Type = Varchar, length = 50
(Make sure you take the minimum length as 20 since the
character length in the input file is 20).

Now, click on the "Load" option at the bottom and import the
table definitions by choosing "Sequential File Definitions".
After the table definitions are imported. Double click on
the imported table definition. Click OK.

STAGE 2:

Transformer Properties:

Click on the O/p column, and create 4 Columns at the bottom.

Column Name SQL Type Length
Field1 Varchar 50
Field2 Varchar 50
Field3 Varchar 50
Field4 Varchar 50

Create 4 Stage variables:

Derivation Stage
Variable
Left(inputcolumnname,5) F1
Right(Left(inputcolumnname,10),5) F2
Right(Left(inputcolumnname,15),5) F3
Right(inputcolumnname,5) F4

Map the above stage variables by dragging and dropping into
the below O/p table

O/p Table

Derivation Column Name
F1 Field1
F2 Field2
F3 Field3
F4 Feild4

STAGE 3:

Dataset File Stage/Sequential File Stage Properties:

Double click and File = browse the output file path.

If it's sequential, .txt || Dataset File, .ds


Hope this helps you !!! If you follow the above procedure,
you must get the out put correct!!!

All The Best !!!

Thanks & Regards,
VS

Is This Answer Correct ?    24 Yes 0 No

in one scenario source flat file like Fileld1 00122001550056200568 00256002360014500896 00123004..

Answer / mrvprasad

Take 4 field names(field1 field2 field3 field4) in output stage.

use Transformer stage: In Derivation use the below substring

Field1: SourceColumn[1,5]
Field2: SourceColumn[6,10]
Field3: SourceColumn[11,15]
Field4: SourceColumn[16,20] use this one u will get correct o/p.

Is This Answer Correct ?    3 Yes 0 No

in one scenario source flat file like Fileld1 00122001550056200568 00256002360014500896 00123004..

Answer / anat

Hi as per my knowledge pls follow the below steps
1)take entire source as single colom
2)in transfomer split that colom in to multiple coloms by
using substring or field functons

Is This Answer Correct ?    2 Yes 2 No

in one scenario source flat file like Fileld1 00122001550056200568 00256002360014500896 00123004..

Answer / sindhu

BY using sequential file in format delimeter =none while importing the data enable the option fixed width and give column width 5 space 5 space 5.datatype as varchar inorder to get zeros also in output.
reducing the stages will always increase performance

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

Explain the functionality of your current project?

1 Answers   IBM, Miles Software,


What is exact difference between Parallel Jobs and server Jobs..

7 Answers   IBM,


what is diff b/w datastage 8.1,8.5,8.7?

1 Answers   IBM,


by using dsjob..we can run only one job at a time?how can u run multiple jobs at a time in unix?

1 Answers  


what is mapping lookup

1 Answers  


how to validate the jobs

2 Answers   IBM,


Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?

0 Answers   HCL,


What is the use of Row generator stage?

2 Answers  


Hi dude, i/p eno ename date edate deptno 1 x 10thjuly 30july A 2 y 10th aug 30 aug B 1 x 1aug ------ A 3 z 1jan ------ c 2 y 1sep ------ B o/p is eno ename date edate deptno 1 x 1aug ------ A 2 y 1sep ------ B 3 z 1jan ------ c Here edate is System generates we don't know that value. Please design the job by using SCD stage and Sql query. If any body know this answer please tel me. Tanks.

1 Answers   Amdocs,


DataStage Scenario based Interview Questions

1 Answers  


how to do pergformence tuning in datastage?

4 Answers   MCA, Symphony, TCS,


How do you generate sequence number in datastage?

0 Answers  


Categories