Noodling Over EDI Using C#

Years ago, I wrote an application in VBA for Excel to parse an 830 document and format the data into a useable worksheet. The code can process an 830 document (EDI text file) containing upwards of 2500 lines in less than 20 seconds all while creating and formatting the worksheet from scratch. The VBA code also updates the orders and releases against each part number in the SQL Server database.

The challenge now extends to creating an 856 document from various tables in our SQL Server MRP system and sending the 856 to our customer. A number of interesting resources can be found by searching the internet for C# EDI solutions. These sites appear in the “Related Articles and Resources” section below.

I followed the example code at EDI.Net – Library for processing EDI files (mylifeismymessage.net) to translate an 830 document using EDI.Net and it worked. Although the file translates successfully, a lot of work remains to be done to work with the data. EDITools presents an interesting tool set for working with EDI documents.

I took me a week of spare time to write the parser for the 830 document and we continue to use it to this day. Writing out an 856 document doesn’t appear to be that difficult. The question is whether to use one of the available libraries, or to simply create my own. All the data required to feed the 856 exists in our current manufacturing database and is easy to populate with data derived from the packing slip for the subsequent shipment.

If we are going to send or receive EDI data using our own server, we also need to create a “FileSystemWatcher” to monitor for new files. Aside from reading the 830 and writing the 856, we need the ability to send and receive documents too.

This question on StackOverflow, C# .NET AS2 communication – Stack Overflow, provides some interesting discussion and resources. Of particular interest is IPWorks EDI | EDI/AS2 Library | nsoftware. nsoftware.com offers IPWorks EDI free, fully-functional 30-day trials for all of their products, and technical support staff are available to answer any questions you may have during the evaluation period.

IPWorks EDI Communications Plus Mapping & Translation .NET Edition and IPWorks X12 2020.NET Edition carry a price tag of $2,499 and $899 respectively and may be one of the reasons why nsoftware.com offers a 30-day free trial.

There’s no rush, just pursuit of the best solution to integrate EDI with our ERP system since it is presently not supported.

Related Articles and Resources

Leave a Reply