Subject:splitting a row into multiple into multiple fields to convert to xml Author:peter cameron Date:07 Jun 2011 08:58 AM
Hello,
I have imported a customer source file and am creating a conv file to convert to xml.The source file that is basically text, an example below has 3 rows. Row A is one Row(table) in xml and the 2 rows starting with B are the second XML row(table) in the xml. The data in the B rows repeat a number of times within the rows as well as seperate rows. I can pattern match the rows by ^B at the beginning. The issue i have is to map the fields within a row, i need to split up the data within a row.
Subject:splitting a row into multiple into multiple fields to convert to xml Author:Ivan Pedruzzi Date:08 Jun 2011 12:00 AM
If these records are based on fixed layout you can mix pattern matching with fixed layout region; have a look at the online documentation -> Adjusting Fixed-Width Regions.
Subject:splitting a row into multiple into multiple fields to convert to xml Author:peter cameron Date:08 Jun 2011 06:04 AM
thanks for reply. Having a little difficulty trying to apply what you have said. the first customer row (example A above) will be fixed, however the B row will have a maximum width but we don;t know how many records will be in the next B rows, so the maximum number of records in the first B row will be say 10, then if we have another 2 B rows the second one will contain 10 records and the 3rd we don't know could be anything from 1 to 10 records. However the records in each row do follow a pattern like my example i.e.
can you help me a litte more with the solution to my challange?