Text file read from a particular row.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vsanghvi
Participant
Posts: 22
Joined: Wed Mar 09, 2005 4:47 pm

Text file read from a particular row.

Post by vsanghvi »

Hi,

I have reading data from .csv and I need to only strat transfering data when column 1 value is "XYZ" and all afterwards. Let's say the document is 1000 rows and the XYZ is at 150. So I need to copy starting 150 to 1000. It is not always 150 where the XYZ is. How can do that ? Any help appreciated.

Thanks
VSanghvi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Create a stage variable called FoundRow, use the derivation

Code: Select all

IF FoundRow OR {YourCondition} THEN 1 ELSE 0
Then make a constraint stating
FoundRow = 1
and Bob's Your Uncle {sorry, I'm in the UK right now and I've been yearning to use that colloquialism}
vsanghvi
Participant
Posts: 22
Joined: Wed Mar 09, 2005 4:47 pm

Thanks

Post by vsanghvi »

Hi ArndW,

It works. Thanks a lot for the help.

VSanghvi
Post Reply