EDI always had and still plays an important role in communication between trading partners.

A long time ago we implemented a class library to handle EDI communication in DataFlex.

The class library consists of a multi layer design. The base layer is a class called cszX12Document.

cszX12Document class

The cszX12Document class implements the base functionality to read and write X12 documents the base format for EDI documents.

This class knows all about the X12 file format, its separators, elements,  segments etc.

It has functionality to read files or streams of data, functions to handle different field formats as well as error handling

On top of the cszX12Document class we then have the EDI base layer. This EDI base layer implements EDI standards such as Interchange Control Headers and Trailers, Functional Group Headers and Trailers, HL Elements, Date and Time periods and other EDI specific features.

The next abstraction layer is the EDI version specific layer. For example for VICS 4010 EDI compliant documents or 5010 compliant documents.

The document specific layer is based on the previous version specific layer and implements specific EDI documents such as for example a 940 or a 995.

Each class can implement the reading as well as the writing or only one of the two depending on the need for the type of document

And last but not least is a layer that implements the specific ERP systems database.