RFI Browser

Back  RFI # 43: 997 Code Value for BIN/BDS Length Error

Formal vs. Informal Help Informal Formal

Submitter

Todd Cochrane

Description

For version 005010 and version 005050, which 997 segment, data element, and code value should be used to report the following X12 Standard Conformance error: The actual length of data in a binary segment data element BIN02 is not the same as the stated length in BIN01, or the actual filtered length of data in a binary segment data element BDS03 is not the same as the stated length in data element BDS02.

Response

If the binary data element is shorter than the length specified in DE784, the code used should be 4 indicating data element too short. If the binary data element is longer than the length specified in DE784, the code used should be 5 indicating data element too long.

Recommendation

The official response to a formal RFI is a letter from the current ASC X12 chair. This website often displays a summary of the RFI. Click here to view a PDF of the letter for this RFI.

In actual implementations it may not be practical or possible to generate the too short or too long error codes. DE784 is intended to instruct an EDI parser as to the number of octets included in the binary data element. Most EDI parsing algorithms retrieve this number of octets for the content of the binary data element and continue parsing at the next character after this length. If the next character is not the segment terminator, it may or may not be possible to continue parsing the transaction set instance or make reasonable assumptions about the current position. Therefore a variety of error conditions may be reported. For example, consider the case of a binary data element containing an instance of another X12, EDIFACT, or HL7 transaction set or message using the same delimiters as the enclosing transaction set, and the binary data element is longer than asserted. If the calculated next byte happens to be a segment terminator a parser will conclude that processing of the binary data element has been completed successfully and will attempt to continue processing the enclosing transaction set instance while actually processing the remaining content of the binary data element. The result is most likely an immediate segment sequence error, unrecognized segment, segment not in transaction set, or similar error.
Submission 1/1/2009
Status Date 1/1/2009
Status F - Final
Primary References
Document 5050