Extract row wise data

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Rea_Antony
Participant
Posts: 73
Joined: Thu Mar 08, 2007 9:50 pm
Location: Bangalore

Extract row wise data

Post by Rea_Antony »

Hi
I have a file which has 3 records. It is a fixed width file.
The 1st record is a 'header' record and has different fields.
The rest 2 records are 'detail' records and has similar fields.

Now, I want to extract data only from the 2nd record onwards. Is there some kind of row count available to do this?

Also, I need to extract only one field from the header record and use it in the procesing for one of the detail record fields.

How do I do this? Can someone please guide me or push me in the right direction?

Thank you.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Set first record is column-name to be true
Rea_Antony
Participant
Posts: 73
Joined: Thu Mar 08, 2007 9:50 pm
Location: Bangalore

Post by Rea_Antony »

Thank you. That would help me process data from the second row onwards. But how do I obtain teh values in the first record for later processing?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Sequential File stage? Allow the header record to be rejected, since it does not match the metadata of a detail record. Pass the Reject link into a Column Import stage to re-parse the raw rejected record and capture the desired header information downstream of that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply