Sun B2B Suite ASC X12 OTD Library User's Guide

Appendix A X12OTDErrors Schema File, Sample XML and Sample for Identifying Segment IDs

This appendix provides the contents of the X12OTDErrors.xsd file, which is the XML schema file the validation output string conforms to and also includes a sample of validation output XML. For more information, refer to ASC X12 Validation Support and performValidation. This appendix also contains a sample for identifying segment IDs using local codes.

This appendix. contains the following topics:

Contents of the X12OTDErrors.xsd File


<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Tony (TechLeader) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" 
attributeFormDefault="unqualified">
  <xs:element name="X12OTDErrors">
    <xs:annotation>
      <xs:documentation>Validation Errors from an X12 OTD validation</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="X12ICError" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="X12FGError" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="X12TSError" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="X12DataError" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="X12ICError">
    <xs:annotation>
      <xs:documentation>Interchange Envelope Validation Error Structure.
 For TA1 generations</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="InteContNumb" type="xs:string"/>
        <xs:element name="InteContDate" type="xs:string"/>
        <xs:element name="InteContTime" type="xs:string"/>
        <xs:element name="InteNoteCode" type="xs:string"/>
        <xs:element name="ICErrorDesc" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="X12FGError">
    <xs:annotation>
      <xs:documentation>Functional Group Envelope Validation Error Structure.
 For AK1AK9 generations</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="FuncIdenCode" type="xs:string"/>
        <xs:element name="GrouContNumb" type="xs:string"/>
        <xs:element name="NumbOfTranSetsIncl" type="xs:string"/>
        <xs:element name="FuncGrouSyntErroCode" type="xs:string"/>
        <xs:element name="FGErrorDesc" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="X12TSError">
    <xs:annotation>
      <xs:documentation>Transaction Set Envelope Validation Error Structure.
 For AK2AK5 generations</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="TranSetIdenCode" type="xs:string"/>
        <xs:element name="TranSetContNumb" type="xs:string"/>
        <xs:element name="TranSetSyntErroCode" type="xs:string"/>
        <xs:element name="TSErrorDesc" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="X12DataError">
    <xs:annotation>
      <xs:documentation>Transaction Set (excluding envelopes) Validation Error Structure.
 For AK3AK4 generations</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Level" type="xs:short" minOccurs="0"/>
        <xs:element name="SegmIDCode" type="xs:string"/>
        <xs:element name="SegmPosiInTranSet" type="xs:int"/>
        <xs:element name="LoopIdenCode" type="xs:string" minOccurs="0"/>
        <xs:element name="SegmSyntErroCode" type="xs:short" minOccurs="0"/>
        <xs:element name="ElemPosiInSegm" type="xs:short"/>
        <xs:element name="CompDataElemPosiInComp" type="xs:short" minOccurs="0"/>
        <xs:element name="DataElemRefeNumb" type="xs:string" minOccurs="0"/>
        <xs:element name="DataElemSyntErroCode" type="xs:short"/>
        <xs:element name="CopyOfBadDataElem" type="xs:string" minOccurs="0"/>
        <xs:element name="RepeatIndex" type="xs:short" minOccurs="0"/>
        <xs:element name="ErrorCode" type="xs:int"/>
        <xs:element name="ErrorDesc" type="xs:string" minOccurs="0"/>
        <xs:element name="Severity" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Sample of Validation Output XML


<X12OTDErrors>
  <X12ICError>
    <InteContNumb>000000001</InteContNumb>
    <InteContDate>041102</InteContDate>
    <InteContTime>1441</InteContTime>
    <InteNoteCode>021</InteNoteCode>
    <ICErrorDesc>Invalid Number of Included Groups Value</ICErrorDesc>
  </X12ICError>
  <X12FGError>
    <FuncIdenCode>PO</FuncIdenCode>
    <GrouContNumb>1</GrouContNumb>
    <NumbOfTranSetsIncl>2</NumbOfTranSetsIncl>
    <FuncGrouSyntErroCode>5</FuncGrouSyntErroCode>
  </X12FGError>
  <X12FGError>
    <FuncIdenCode>PO</FuncIdenCode>
    <GrouContNumb>1</GrouContNumb>
    <NumbOfTranSetsIncl>2</NumbOfTranSetsIncl>
    <FuncGrouSyntErroCode>4</FuncGrouSyntErroCode>
    <FGErrorDesc>Number of Included Transaction Sets Does Not Match Actual Count</FGErrorDesc>
  </X12FGError>
  <X12TSError>
    <TranSetIdenCode>850</TranSetIdenCode>
    <TranSetContNumb>0001</TranSetContNumb>
    <TranSetSyntErroCode>4</TranSetSyntErroCode>
    <TSErrorDesc>Number of Included Segments Does Not Match Actual Count</TSErrorDesc>
  </X12TSError>
  <X12DataError>
    <Level>1</Level>
    <SegmIDCode>MEA</SegmIDCode>
    <SegmPosiInTranSet>21</SegmPosiInTranSet>
    <LoopIdenCode/>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>4</ElemPosiInSegm>
    <DataElemRefeNumb>C001</DataElemRefeNumb>
    <DataElemSyntErroCode>10</DataElemSyntErroCode>
    <ErrorCode>15025</ErrorCode>
    <ErrorDesc>MEA_4 at 21: [Syntax rule E-Exclusion: One or None]
 Exclusion condition violated because E0412</ErrorDesc>
    <Severity>ERROR</Severity>
  </X12DataError>
  <X12DataError>
    <Level>1</Level>
    <SegmIDCode>N4</SegmIDCode>
    <SegmPosiInTranSet>195</SegmPosiInTranSet>
    <LoopIdenCode>N1</LoopIdenCode>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>7</ElemPosiInSegm>
    <DataElemRefeNumb>1715</DataElemRefeNumb>
    <DataElemSyntErroCode>10</DataElemSyntErroCode>
    <CopyOfBadDataElem>CNT</CopyOfBadDataElem>
    <ErrorCode>15025</ErrorCode>
    <ErrorDesc>N1_N4_7 at 195 [CNT]: [Syntax rule E-Exclusion: One or None]
 Exclusion condition violated because E0207</ErrorDesc>
    <Severity>ERROR</Severity>
  </X12DataError>
</X12OTDErrors>

Sample for Identifying Segment IDs Using Local Codes

This is an example of a customized definition of a X12 transaction set 814 of v4010. The .SETS section of the SEF file is:


.SETS
814=^[ST,M][BGN*8,M][.CUR]{:>1+5[.FA1]+1[FA2,M,>1]}{:>1+4[N1*12@192]+10[.N2,
,2][N3*5,,2][N4*23][.PER*1,,>1][.REF,,>1][.DTM,,>1]}{:>1-60[N1*5@58]+10[.N2,
,2][.N3,,2][.N4][.PER,,>1][.REF,,>1][.DTM,,>1]}{:>1-60[N1*5@151]+10[.N2,,2][
.N3,,2][.N4][.PER,,>1][.REF,,>1][.DTM,,>1]}{:>1-60[N1*13@51]+10[.N2,,2][.N3,
,2][.N4][.PER,,>1][.REF,,>1][.DTM,,>1]}^{:>1[LIN*4@176][ASI*1@14][REF*9@172,
,>1]+0[REF*9,,>1][REF*10@200,,>1][.REF*10@181,,>1][REF*12@177,,>1][REF*12@18
2,,>1][REF*10@178,,>1]+10[DTM*6@76,,>1][.CUR@17][.AMT*1@82,,>1]+0[.AMT*1@81,
,>1][.AMT*1@80,,>1][.AMT*1@79,,>1][.AMT*1@18,,>1]+10[.PM]{:>1+5[.FA1]+1[FA2,
M,>1]}{:>1+4[NM1*3]+10[.N2,,2][.N3,,2][.N4][.PER,,>1][REF*14@87,,>1]+0[REF*1
4@86,,>1][REF*10@93,,>1][REF*10@88,,>1][REF*10@92,,>1][REF*10@169,,>1][REF*1
5@179,,>1][REF*16@89,,>1]+10[DTM*10@28,,>1]}}[SE,M]

The same definition may also be viewed in a third—party application such as EDISIM 5.0 (see figure Figure A–1). Multiple N1 segments as well as REF segments are customized so that they are adjacent to each other in a tandem fashion. Local codes for these adjacent segments must be used for parsing a message. Therefore, the Segment IDs Using Local Codes field must have a N1,REF value (a list of segment IDs separated by commas).

Figure A–1 X12 Transaction Set 814 of v4010

X12 Transaction Set 814 of v4010