ediSchema

The ediSchema represents an implementation guideline, or a schema, used to validate and verify an EDI document.  Currently, Framework EDI supports three types of implementation guidelines:

  1. Standard Exchange Format,
  2. Standard Reference Library, and
  3. Built-in Control Segments.

Standard Exchange Format

The Standard Exchange Format (SEF) is an open standard that governs the layout, in a text file, the artifacts and rules of syntactically validating and verifying an EDI document.  It is a powerful tool in document processing in that its mature and comprehensive format describes in detail the nature of a single data; how the data is related to other data; how the data is related to the document; and how the data can control the nature of processing the document.  It can be customized to allow bilateral rules between trading partners, and, because it is in a text file, custom implementations can be easily communicated across multiple trading partners.

To specify the use of a SEF file,  load or import the file in the top level ediDocument object using the LoadSchema or ImportSchema method respectively.  The document processed using the LoadEdi method has the SEF available to it as an implementation guideline.

Dim oEdiDoc As Fredi.ediDocument
Dim oSchema As Fredi.ediSchema
Set oSchema = oEdiDoc.LoadSchema("PO_850.SEF", Schema_Standard_Exchange_Format)
oEdiDoc.LoadEdi("PODOC.TXT")

Standard Reference Library

The Standard Reference Library is a component resource that records multiple published standard versions of implementation guidelines, which are used for syntactically validating and verifying EDI documents.  In cases where there are no SEF files available to translate the document, the Standard Reference Library can be used to obtain that information instead.  Unlike external file types like SEF files, the information in the Standard Reference Library is fixed and cannot be customized.  Occassionally, additional versions of a published standard may be added to the library as part of the product update, or as part of later versions of the Framework EDI product.  Currently, only two controlling agencies store information in the Standard Reference Library: ASC/X12 and UN/EDIFACT.

By default, the Standard Reference Library is referenced for the best version to use if no matching version is found in the SEF file.  However, to specify explicit use of a version in the Standard Reference Library,  load or import the version in the top level ediDocument object using the LoadSchema or ImportSchema method respectively.  The document processed using the LoadEdi method has the version available to it as an implementation guideline.

Dim oEdiDoc As Fredi.ediDocument
Dim oSchema As Fredi.ediSchema
Set oSchema = oEdiDoc.LoadSchema("X|004010", Schema_Standard_Exchange_Format)
oEdiDoc.LoadEdi("PODOC.TXT")

Build-In Control Segments

If SEF files are not available, and the Standard Reference Library is disabled, built-in Control Segments are used to read the document instead.  Also, if the requested version does not exist in either the available SEF files, or Standard Reference Library, these control segment definitions are used.  These built-in Control Segments are mostly data segment definitions of header and trailer data of semantic envelopes in the EDI document, and at most can only serve as a guideline as to how the EDI document is laid out.  Falling back to using the built-in Control Segments does not guarantee that the document will be read successfully, because in the absence of information about the nature of a particular data, the operation may fail.  Also, syntax validation is disabled. 

Methods

Properties