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.
The Challenge: We are having a problem with the MSG segments which are getting "Received segment MSG was unexpected" when receiving in to TC.
This falls in the N1 loop making this MSG segment fall under the LDT loop. Each explicit loop has a segment assigned as a "loop starter". In this particular document, LDT segment is the loop starter. The loop starter is usually a mandatory segment. Hence, the MSG is not seen because of the absence of that loop starter.
The Solution: Make the LOOP Starter optional for the LDT loop (check your Document Setup Guide on Creating Variable Loop Starts): a. Make all segments before the target segment Optional and occurring once. b. Including the target segment (MSG) as well. c. Use the loop header for record association if needed.
This will make the MSG segment as the loop starter.
Do you have a new CHALLENGE? Let us know HERE.
Email: info@help4i.com to arrange a complimentary assistance in implementing this.