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.
Challenge 1: The trading partner is requiring a one-line summary instead of enumerating the details in the OID segment. The details from the file need to be summarized and posted in the OID segment.
The Solution: The details in the file will be read via a loop placeholder prior to the target segment. This will be done by:
1. Pick a segment where the timing of the summarization will occur. This segment should NOT be in the same loop as the target segment. It can NOT also be in a segment that is being mapped.
2. Multiply the occurrence of the identified segment to the maximum records expected from the detail file.
3. Since the identified segment now occurs more than once, "Options" is now available. Establish the record association of the detail file in this segment.
4. Create work fields that will contain the summary of the fields from the detail file. Because the segment placeholder is not being mapped, make sure the "Retain work field mapping when segment is not mapped" is CHECKED.
5. Time the summarization of the details to the work fields on this loop placeholder.
6. Map the work fields (summaries) to the TARGET segment
7. Find a segment to initialize the work field for the next summarization (if needed).
Challenge 2 (810 Sample Situation):
How to summarize multiple SAC Segment to a single segment without modifying records in the UFD.
Do you have a new CHALLENGE? Let us know HERE.