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

My input has a unique column-id with the values 10,20,30.....how can i get first record in one o/p file,last record in another o/p file and rest of the records in 3rd o/p file?

Answer Posted / kumar

As you have a single text file as Source. Use folloowing
approach to get the desired output.

Head1 Target1

Seq. File Copy Tail2 Target2

Head3 Tail Target3
Steps:
1.> Read your source file using sequential file stage.
2.> Pass the records to copy stage and take 3 output link.
3.> 1 to Head stage head1, 2nd to Head2 and 3rd to Head3.
4.> In the 1st Head Stage Head1, in the properties specify
1, it will pick up the 1st record and make that record to
target 1.

5.> Similarly, to capture last record in target2, in Tail
stage property mention 1. It will take last record and pass
it to target2.

6.> To load rest records 1st using head stage, capture top
records say, if u have 10 records in the source pick top 9
records using head stage then use tail stage followed by
head stage and mention 8, it will pick all records except
1st one. then u can load these to target3.

If u get confused ask me ....

Thanks
Kumar

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which r the connectors used in san?

2144


A signal has a wavelength of 1 micro min in air.how far can the front of the wave travel during 1000periods?

2445


How a routine is called in datastage job?

1045


How you can fix the truncated data error in datastage?

1677


What is the difference between server job and parallel jobs?

1093


how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

3265


What is the purpose of pivot stage?

1100


Differentiate between validated and Compiled in the Datastage?

1196


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

1333


What a datastage macro?

1007


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

1100


What are the different plug-ins stages used in your projects?

1029


How many Key we can define in remove duplicate stage?

1315


options available in sequence job to run,validate?

1260


What is the difference between an operational datastage and a data warehouse?

1092