About EasyMorph Tutorials & Examples Web-help

EDI Import issues

Dear All,

I am complete Newbie (so apologies if this is a simple request) but I have a data file which is made up as attached Prod199_2877_ni_llp_23032021030001 - Copy.txt (200.8 KB) .

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.

Many thanks (in advance)

JC

Hi JC and welcome to the Community forum!

The example you provided can be imported into EasyMorph without significant problems, although some parsing is required.

Check out this topic: How to parse EDI file (e.g. X12 transaction set 837)

If you get stuck at some point, let me know.

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!!

As you can appreciate I am pulling my hair out!

Many thanks

JC

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.

parser.morph (5.4 KB)

To learn more about EasyMorph visit easymorph.com.