ASC X12 Standards

Rail Industry Guidelines for EDI: Introduction and Overview

ASC X12 Standards: General Information

The ASC X12 Standards specify the format and data content of electronic business transactions. Standards are structured so that computer programs can translate data to and from internal formats without extensive reprogramming. Changes to the published standard occur continually through a structured process managed by the ASC X12 Committee. Each year a new version/release of the standards is published, incorporating changes approved during the previous year.

Basic Structural Components of ASC X12 Standards

A “transaction set” is the term used in business data interchange to describe the electronic transmission of a single document (purchase order, invoice, etc.) between one company’s computer and another company’s computer. The data included in a transaction set conveys the same information as a conventional printed document. Within each transaction set three general areas relate directly to the format of the printed document. These are:

  • The Header Area (Table 1) Contains preliminary information that pertains to the entire document, such as date, company name, address, etc.
  • The Detail Area (Table 2) Contains the actual business transaction and includes information such as quantities, descriptions and prices.
  • The Summary Area (Table 3) Contains control information and other data that relate to the total transaction. The transaction set tables define the purpose and scope of each transaction set and specify the relationship between segments to communicate an entire business function. The ASC X12 Standard segments used within the transaction set are sequentially listed in each table area.
  • Data Segments Data segments consist of logically related data elements in a defined sequence. Each data segment has been assigned a unique segment identifier that comprises the first characters of the segment. When segments are combined to form a transaction set, their relationship to the transaction set is defined by a segment condition designator and a segment sequence. Some segments may be repeated, and groups of segments may be repeated as loops.
  • Data Element Specification The data element specification lists each data element, in order, for the segment. For each data element there is one line to identify reference designator, data element number, data element name, and attributes. Syntax notes, semantic notes and comments are provided where applicable.
  • Transaction Sets Used In The transaction sets in which the data segments are used are listed under this heading.
  • Data Element Reference Designator Each data element used within the data segment is assigned a data element reference number indicating its sequential position within the segment. The counting of positions starts with 01 for the first data element and is incremented by one to the end of the segment. Each data element in a composite structure is assigned a code composed of the data segment identifier followed by the position number (Example: BEG01).
  • Data Element Number This is the number assigned to the data element by ASC X12. This number may be used for direct reference in the ASC X12.3 Data Element Dictionary.
  • Data Element Name The name assigned to the data element by ASC X12.
  • Attributes The attributes assigned to the data element: data element requirement, data element type, minimum/maximum length.
  • Data Element Requirement A code which defines the requirement of the data element within the data segment.
  • M Mandatory The data element must be used if the segment is used.
  • O Optional The data element may be used at the discretion of the sending party or based on mutual agreement of the interchange parties.
  • X Relational A relational condition exists between two or more data elements within a segment based on the presence or absence of one of those data elements. The relational condition is explained in Syntax Notes.
  • Data Elements A data element can represent a qualifier, a value, or text. Data elements can have several meanings depending on the context (e.g., “quantity” has different meanings depending on whether it is quantity ordered, quantity received, quantity invoiced, etc.). Each data element has been assigned a unique reference number. A listing of all data elements can be found in the ASC X12.3 Data Element Dictionary.
  • Data Element Name This is the name assigned to the data element by ASC X12 in the ASC X12.3 Data Element Dictionary.
  • Attributes Each data element has two ASC X12 attributes: element type, and minimum/maximum length.
  • Element Type
    • ID Identifier Values for the identifier-type data elements are taken from a predefined list of values maintained by the ASC X12 Committee and other standards setting bodies.
    • AN String Values for the string-type data elements are a sequence of any letters, digits, spaces, and/or special characters.
    • DT Date Values for a date-type data element are in the format CCYYMMDD.
    • TM Time Values for a time-type data element are in the format HHMMSSDD expressed in a 24 hour clock.
    • Nn Numeric Values for a numeric data element are in an implied decimal format, where “n” indicates the number of places to the right of the decimal point. The decimal point is not transmitted. For negative values a leading minus sign is used. Example: Under a format of N2, the value of -12.54 will be transmitted as “-1254″.
    • R Decimal The decimal point is optional for integer values but required for fractional values. For negative values a leading minus sign is used. Example: Under a format of R, the value of -12.54 will be transmitted as “-12.54″.
  • Minimum/Maximum Defines the minimum and maximum field length of the data element. The length of a numeric type data element does not include the optional sign. The length of a decimal type data element does not include the optional minus signs, decimal point, or trailing exponent indicator “E.” Example: 02/02–fixed length of 2 characters. 04/09–Minimum length of 4 characters and maximum length of 9 characters.

Syntax Notes

Relational conditions of data elements are explained in Syntax Notes. ASC X12 uses a coding scheme for syntax notes. The code consists of a single letter followed by a series of numbers. The numbers refer to the reference designator of each element within the segment. For instance, the first element in the segment is referred to as “01,” the second “02,” and so on. The letter refers to a type of syntax note. For example, R0203 indicates that either the second or third element must be used. The complete list of single letter codes is:

  • R Required This indicates that at least one of the referenced elements must be sent.
  • P Paired This indicates that if any of the referenced elements are used, then they all must be used.
  • C Conditional This indicates that if the first referenced element is used, then all of the remaining referenced elements must be used.
  • L List Conditional This indicates that if the first referenced element is used, then at least one of the remaining elements must be used.
  • E Exclusion This indicates that only one of the referenced elements may be used.

Envelopes

A set of documents formatted using the ASC X12 Standards is placed within several nested “envelopes.” Each envelope consists of a header logical record, and a trailer logical record. Each header and trailer carry an identifying control number. These must match. In addition, each trailer carries a count of the number of items contained in the next nested level. Multiple transaction sets (documents) may be contained in each functional group envelope and multiple functional groups may be contained in each interchange. Documents are batched into an interchange envelope for delivery to the recipient designated in the ISA segment. Figure 5 illustrates the nesting of the ASC X12 control segments.