Determing EOF of sequential file

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
tiozzo
Charter Member
Charter Member
Posts: 38
Joined: Fri Sep 01, 2006 3:07 pm

Determing EOF of sequential file

Post by tiozzo »

Hi All, I'm reading a sequential file into a transformer stage and want to to special processing on the last row. Is there an easy way to determine the last row in the file? I was thinking of just marking the last row with a flag before reading. Is there an easier way?
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: Determing EOF of sequential file

Post by sud »

Cannot make out your exact equirements, however you can try the tail stage.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
siddesai
Participant
Posts: 26
Joined: Thu Apr 26, 2007 11:28 pm

Post by siddesai »

As sud said..use Tail stage and set the number of lines to 1 this will give you the last row in your file. Now, you can compare your key field to the key field of this tail -1 record and then process accordingly.

Hope that helps
Post Reply