Electronic Data Interchange
Reporting Syntactical Errors for UN/EDIFACT

Framework EDI (FREDI) reports errors in UN/EDIFACT documents using the following methods:

 

Auto-Generate of Envelope Service Segments

 

Auto-Create of Interchange envelope for CONTRL message

The CONTRL message generated for batch EDI is wrapped in the interchange envelope before it is sent back to the sender of the subject interchange.  The interchange header (UNB) service segment is constructed by FREDI as follows:

POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
010 S001 SYNTAX IDENTIFIER The component elements in this composite is set to the same value as the data elements in the subject interchange.
020 S002 INTERCHANGE SENDER The component elements in this composite is set to the same value as the interchange recipient S003 composite of the subject interchange.
030 S003 INTERCHANGE RECIPIENT The component elements in this composite is set to the same value as the interchange sender S002 composite of the subject interchange.
040 S004 DATE AND TIME OF PREPARATION The date and time values in this composite element is set to the current date and time.  By default, the date and time is in GMT.
050 0020 INTERCHANGE CONTROL REFERENCE The default value of this control number is the incremental count of interchange envelopes in the entire EDI document.  The number is padded with zeros to satisfy minimum length requirement.
110 0035 TEST INDICATOR The test indicator value is the same as that of the subject interchange.


All other data elements not specified in the table above are not assigned a value, and are regarded as empty.  The client should programmatically assign the appropriate value where applicable.  See Procedure for Changing a Value in a UN/EDIFACT Document.


The interchange trailer (UNZ) service segment is constructed as follows:

POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
010 0036 INTERCHANGE CONTROL COUNT A numeric value  is assigned to this data element for the number of CONTRL messages created and enveloped by the interchange.  The value '1' is assigned if an interchange receipt, or an interchange response, only is created. The value '2' is assigned if an interchange receipt and a interchange response are both created.
020 0020 INTERCHANGE CONTROL REFERENCE The value of this data element is the same as the interchange control reference set in the interchange header.


Auto-Create of Message envelope of the CONTRL message

The Message Header (UNH) for the CONTRL message is constructed as follows:

POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
010 0062 Message Reference Number The value set here is the incremental count of messages created in the interchange.  The value is padded with zeros to satisfy minimum length requirement.
020 S009/0065 Message Type The message type identifier "CONTRL" is assigned to this component element.
  S009/0052 Message Version Number Version number from Schema.  Example, "S" or "D".
  S009/0054 Message Release Number Version release from Schema. Example, "93A".
  S009/0051 Controlling Agency Controlling agency is "UN".
  S009/0057 Association Assigned Code Industry from Schema.

The Message Trailer (UNT) for the CONTRL message is constructed as follows:

POSITION ELEMENT ID DESCRIPTION CONSTRUCT INFO
010 0074 NUMBER OF SEGMENTS IN A MESSAGE  The number of data segments created in the message is assigned to this data element.
020 0062 MESSAGE REFERENCE NUMBER The value set here is identical to the same data element type in the message header.

 

See Also: