ANSI ASC X12

From Wiki

Russian

ANSI ASC X12 is the official designation of the US National standards body for the development and maintenance of EDI standards for the United States. The group was founded in 1979, and is an accredited standards committee under the American National Standards Institute (ANSI). The acronym stands for "American National Standards Institute Accredited Standards Committee X12", with "X12" being a sequential designator assigned by ANSI at the time of accreditation with no other significance.

Contents

Document Structure

To better understand the reason X12 format is what it is we need to understand a bit of the history. X12 was originally developed at the time when due to the limitation of technology when the need of every byte of information was carefully considered. As a result readability was sacrificed for smaller size. The modem speeds of the day were measured in bits (300 to 1200 bit/s being the latest and greatest)

At the same time communication between companies was not very reliable. A dropped line could easily create lost of data. The X12 standard defined a document structure that ensures the accuracy of data. The enveloping used in X12 allows the receiving party to validate that all transmitted segments have been successfully received.

Bellow you can see how the X12 document is organized. The section bellow depicts the structure of the document as it is send or received to/from the trading partner via Value Added Network (VAN).


 +-[ISA] INTERCHANGE CONTROL HEADER
 |
 +---[GS] FUNCTION GROUP HEADER
 |
 +-----[ST] TRANSACTION SET HEADER
 |
 +------- (...)
 |
 +-----[SE] TRANSACTION SET TRAILER
 |
 +---[GE] FUNCTION GROUP TRAILER
 |
 +-[IEA] INTERCHANGE CONTROL TRAILER

In Interchange can contains multiple Function Group envelopes, and each Function Group envelope can contain multiple Transaction Sets. Each transaction set represents a document (order, invoice, ASN).

Interchange Control Envelope [ISA/IEA]

In simple terms an interchange is a smallest unit of exchanged data between two parties. It is important to mentioned that a received or sent file may contain one or more interchanges, but from an EDI point of view each of these interchanges will be handled separately.

Interchange control envelope consists of two segments. The ISA or header segment and the IEA or envelope trailer segment. These two segments are related and contain information to link them together.


ISA Segment

The ISA segment is probably the most important segment because it contains details on how to parse the rest of the file. Unlike any other segment in X12, ISA is fixed length. This allows for processing software to identify delimiters for parsing the rest of the segments. Also, since it is the beginning of an message it is the segment that the processing software seeks to determine the beginning of the message and and separate data from garbage characters that sometime can be found during communication (extra spaces before and after and between EDI messages).

The ISA Segment has the following structure

ISA Segment
  ISA01 Authorization Information Qualifier
  ISA02 Authorization Information
  ISA03 Security Information Qualifier
  ISA04 Security Information
  ISA05 Interchange ID Qualifier
  ISA06 Interchange Sender ID
  ISA07 Interchange ID Qualifier
  ISA08 Interchange Receiver ID
  ISA09 Interchange Date
  ISA10 Interchange Time
  ISA11 Interchange Control Standards ID
  ISA12 Interchange Control Version Number
  ISA13 Interchange Control Number
  ISA14 Acknowledgement Requested
  ISA15 Test Indicator
  ISA16 Subelement Separator

IEA Segment

The IEA Segment has the following structure

ISA Segment
  IEA01 Number of Included Functional Groups
  IEA02 Interchange Control Number (same as ISA13)

Function Group Envelope [GS/GE]

GS Segment

The GS Segment has the following structure

GS Segment
  GS01  Functional ID code
  GS02  Application Sender's Code
  GS03  Application Receiver's Code
  GS04  Date
  GS05  Time
  GS06  Group Control Number
  GS07  Responsible Agency Code
  GS08  Version/Rel. Ind. ID Code

GE Segment

The GS Segment has the following structure

GE Segment
  GE01  Number of Transaction Sets Included in this Function Group
  GE02  Group Control Number (same as GS06)

Transaction Envelope [ST/SE]

ST Segment

The ST Segment has the following structure

ST Segment
  ST01  Transaction set ID code
  ST02  Transaction set control number

SE Segment

The SE Segment has the following structure

SE Segment
  SE01  Number of included segments
  SE02  Transaction set control number (same as ST02)
Personal tools