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:
The SAC records are not mapping at all, it seems the mapper could not see it.
We are sure that we have the correct data in the files by checking the content of the physical files using STRSQL.
The SAC file are summaries pertaining to the document, hence is mapped in SAC(1270). The SAC file is defined after the IT1 details file.
Diagnosis:
Print the map and UFD.
The logical file definition order only come in effect when the keys are the same. In the case of DIINH01, DIINH02, DIINH03 and DIIND03 (which have the same keys and key order), the iSeries will position the records of these files in the order which is defined in the logical file definition. Because DIIND01 has an extra key after INVOIC, brings the records of this file after DIIND03. Hence, by the time the IT1 Loop is finished mapping and when it is time to map the SAC Loop; the mapper (software) has already read passed the DIIND03 (making it look like there are no records to be read for the DIIND03).
To confirm the order of the records presented to the software, use DFU on the multiple record format logical.
Prescription:
Remove the extra key after INVOIC and this will bring the IT1 File details (DIIND01) after DIINH03 and before DIIND03.
Do you have a CHALLENGE? Let us know HERE.