Forcing Trailing Element Separators
(For Elements Not Being Mapped)
Subscribe to keep this site alive! Under new management but as always, still 100% FREE. Anyone with the IBM i is a friend of ours.
(For Elements Not Being Mapped)
The Challenge: Our Trading Partner is requiring us to force element separators after the last populated qualifier/qualified element pair of the LIN segment. The trading partner is asking to put a specific number element separators.
The Analysis: By default, Trusted Link skips these and goes directly to the segment separator, after the last mapped element.
The Solution: Map the element separator on the second to the last position of the required number of element separators. Override the Element Properties of this position for Data Type (Alphanumeric, from ID) as well as Minimum Size to 1 (one).
When the Data Type is ID, the value being mapped is validated against the User Element Code List. The minimum size is the minimum length of the field when something is mapped to it. Hence, by default (size 2), when we map the "element separator" (which is one-byte long), the value mapped will be padded with a blank.
The TRN0610 is caused by not having one of the qualifier or the element being qualified of the qualifier-qualified pair not populated. When linked both of them should have value. Since we are populating the qualifier with an element separator, we do not need to populate the qualified element, hence, we need to Remove the Relationship of Qualifier/Qualified Element Pair.
Do you have a new CHALLENGE? Let us know HERE.