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.
Symptoms:
How do I fix the TRN0601 - Missing Mandatory ??? Segment?
Diagnosis:
1)N1 is a loop starter. The error is caused by the existence of details with NO loop starter. This message happens in outgoing documents. The error message: "Received segment ??? was unexpected" is issued for incoming documents with missing loop starters.
Take note of the "Map sequence" in the error and make sure that this matches with the intended mapping. There can be several N1 segments within a document. Here is an example of where a segment can occur in different parts of the document (but with a different map sequence).
2)If the correct mapping is existing, check for conditioning.
3)If a constant is being mapped for the first element of the loop starter, make sure that the [X] Ensure Segment Creation box is checked.
5)Check data of the associated record formats (files).
6)Check the key links for the direct by key access method or the keys of sequential access method files.
Do you have a CHALLENGE? Let us know HERE.