Topic
2 replies Latest Post - ‏2013-09-04T15:30:04Z by Lony19
Lony19
Lony19
2 Posts
ACCEPTED ANSWER

Pinned topic Regarding splitting input files based on a condition

‏2013-09-03T14:53:24Z |

Hello ,

I have got one requirement to split one big input file based on a occurances of repeating block.

Example -

suppose i have a input file which have 100 record set multiple times

100 abc

100 xyz

100 mno

100 qrs

I have to split the above input file so that each input file will have only three records.In the above case two files will be created one is having first 3 record set another one will have only the last one . if there is 8 nos of 100 record set then three t files will be generated.,havine (3,3,2  sets of record.

I took index while breaking the input file in a functional ma pto each record set so that it will count the no of times it will go inside the functional map

but not sure of how to proceed further :( .Any suggestion 

 

 

  • Jim Divoky
    Jim Divoky
    20 Posts
    ACCEPTED ANSWER

    Re: Regarding splitting input files based on a condition

    ‏2013-09-04T14:58:13Z  in response to Lony19

    As I recall, you can handle this by defining a repeating group in the input type tree.  The group would have a range of 1:s and contain the record which has a range of 0:3 or 1:3.   Then in your output map rules you would process one group of 3 at a time.

    Updated on 2013-09-04T14:58:27Z at 2013-09-04T14:58:27Z by Jim Divoky
    • Lony19
      Lony19
      2 Posts
      ACCEPTED ANSWER

      Re: Regarding splitting input files based on a condition

      ‏2013-09-04T15:30:04Z  in response to Jim Divoky

      Thank you so much Jim for your inputs .Today I have  already got the desired output by the same logic you have mentioned.