split file for set of records

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
wtx_dev
Participant
Posts: 10
Joined: Wed Jul 18, 2007 7:40 am

split file for set of records

Post by wtx_dev »

I have file with multiple detail records and i want split the file for particular count.

ex: if file has 10 recs, i want to split them in to five files each file should hgave 2 recs. if file has 20 recs then it should split to 10 files.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

And you want to perform this split with a TX map? Surely it would be easier using a UNIX command such as split or awk - search the forum for examples.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

Bit difficult using Unix commands on Windows.
I'll have a think about it.
Jan
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

You could set your input card to BURST mode with a fetch unit of 2. This would process 2 records through the cycle of output cards each time.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

janhess wrote:Bit difficult using Unix commands on Windows.
I'll have a think about it.
Jan
Not at all. Get MKS Toolkit or CygWin or similar. :wink:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
wtx_dev
Participant
Posts: 10
Joined: Wed Jul 18, 2007 7:40 am

Post by wtx_dev »

Thanks for the comments/advises.

I can able to split the files through TX. In the TT we can have the component rule for particular set of number. In the map it will pass only that set of records to the f_map.

Thanks
Post Reply