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 receiving a flat file with a repeating header-detail-trailer; how do we define this in the software?
The Solution: The objective is to CREATE a LOOP for the HDDDT to recognize that this pattern will occur more than once.
The header and the trailer will only occur once for every
H-D-T pattern, but the D within them can be multiple.
Remove the "Header Property" of the header record so that you could do record association with it.
The record association will post/create a new record to the @ORDHDR whenever an H record is encountered. And while inside that record occurrence, the Details will post/create new records to the @ORDDTL for every "D" record is encountered.
Do you have a new CHALLENGE? Let us know HERE.