RFI Browser

Back  RFI # 46: TRAILING SPACES

Formal vs. Informal Help Informal Formal

Submitter

Todd Cochrane

Description

We have had several customers over the years request different evaluation of spaces in data elements in X12 EDI. It was debated to the point that we made our product configurable so that in the WTX metadata representation (type tree) users can adjust the properties of the elements to suit their needs. However, even with the configuration options we still get debate as to what is the absolute most correct default behavior. Can you please help us resolve this debate? The source of debate: The following can be found in the 'Introduction to Simple Elements' section of the specs. Note: This had changed slightly from older versions but all of the modern versions are similar: String (AN), The string type of data element is symbolized by the representation AN. Contents of string-type data elements are a sequence of any letters, digits, spaces, and/or special characters and contain at least one nonspace character. The significant characters must be left justified. Leading spaces, if used, are assumed to be significant characters. Trailing spaces should be suppressed. A typical example is BPR11. This is an element 510, An alpha numeric with minimum length of 9 and maximum length is 9 example: BPR*C*537.85*D*X12**04*001002572**5001110*5897723333*B24 *04*063100277 The argument has been made that 'should' is not enforceable so trailing spaces are valid. In this case would you consider the data content of "B24 " to be valid or element 510? QUESTION #2 (related) By the same token: As BPR11 is optional would a value of all spaces necessarily be invalid? BPR*C*537.85*D*X12**04*001002572**5001110*5897723333* *04*063100277 The argument has been made that BPR11 doesn't exist and as it is optional the segment is valid without it. BRP11 in this case does not meet the definition of a string (doesn't have at least one nonspace character) so is not present. In this case would you consider the data content of " " to be - element not present and segment valid OR - element present and invalid and segment invalid

Response

Regarding QUESTION #1, X12.6 does indicate that each element is defined with a minimum length and a maximum length. Therefore, some character must be chosen to fill the element to its minimum length. X12.6 is silent as to the question of an appropriate character to be used to fill out the minimum length, however, assuming the trading partners agree on spaces, they would be acceptable. Therefore, the element value in question ("B24 " padded with six spaces) is valid. Regarding QUESTION #2, the example element (BPR11) is considered to be present in the segment because there are more than zero characters occurring in the 11th element position of the BPR segment. The segment remains valid because the elements occur in their correct locations. However, the element is not valid since it contains no non-space characters.

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.

Further Discussion: The X12C Communication and Control Subcommittee response for preparing this interpretation note as advice to the submitter of this Request for Interpretation the following observation: The need for trailing "fill" characters to meet minimum length requirements in strings is comparable to the need for leading zeros to meet minimum length requirements in numeric and decimal number elements as described in sections 3.5.1.1 and 3.5.1.2, respectively. X12C recognizes the deficiency in the X12.6, section 3.5.1.4 and plans to rectify the situation in a future release.
Submission 1/1/2009
Status Date 1/1/2009
Status F - Final
Primary References
Document 5050