As you can see it looks like an EDI file in which each record has a record-type in the first two characters and this is used to rebuild the original file records. Some of the data can occur many times for a given record.
I am struggling to import this into Easymorph and I hope someone can point me in the right direction.
Hi and thank you for your assistance…the difference as I see it between your very clear example and my dataset is that yours has clear delimiters to pick up on.
Unfortunately with my dataset there are no delimiters as such and you have one record split over multiple rows with the only thing separating the records is a row marked “NMF”.
I have then got the issue that each of the rows start with a two letter code which are the relevant column headings with some of the data for particular columns split over a number of rows!!
Look closer at the example I provided. The idea is to use a set of rules to mark every row. It can be a section start/end, block start/end, record start/end, or a particular field. Once you mark every row, then you can use various actions in EasyMorph to transform data accordingly. For instance, create columns, concatenate rows inside records, etc.
You didn’t provide any description of the file format nor the expected output, so I can only guess what the file structure is. Records clearly have sub-records as I can see multiple ‘GP’ inside some records separated by ‘NMF’. Also, the 1st line is probably the file header and the last line in the file footer.
In the project below, you can see how a record’s start/end is marked. If there are subsections inside a record, they should be marked in a similar way. Once you marked up the entire file, you can start converting individual rows, or groups of rows into columns.
All in all, parsing the file is clearly doable with EasyMorph.