Page 1 of 1

split file for set of records

Posted: Wed Jul 18, 2007 7:47 am
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.

Posted: Wed Jul 18, 2007 2:32 pm
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.

Posted: Thu Jul 19, 2007 2:24 am
by janhess
Bit difficult using Unix commands on Windows.
I'll have a think about it.
Jan

Posted: Thu Jul 19, 2007 2:37 am
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.

Posted: Thu Jul 19, 2007 2:43 pm
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:

Posted: Fri Jul 20, 2007 6:51 am
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