This program reads and consolidates all inventory where:
Warehouse < 90 and Edp-no and Warehouse-Loc are the same.
Cost averaging: a table is used internally in the program where the total-extended cost of each inventory detail and the qty are stored. When all of the applicable details are found, the extended costs are totaled and divided by the total quantity of all of the inventory details to compute the new unit cost. The total quantity and the new unit cost are used to populate the matching fields in both the new INV-DETAILS and INVENTORY-TRANS entries.
An INVENTORY-TRANS record is written to provide an audit trail of this unique transaction. This program has two parms:
Parm 1 - live run
Parm 2 – identifier mode, creates comma-del ASCII output file of resulting entries
To provide ‘roll-back’ capabilities, the INV-DETAILS and INVENTORY-TRANS data-sets are saved in a Suprtool self-describing output file, called SAVEIDT and SAVEITR in the HEIDATA group.