Documentation >
MAC-PAC Technical Library >
Distribution >
Sales Analysis >
Programs >
Sales Analysis Async Update - Purpose
Sales Analysis Async Update - Purpose
SA130E
The Sales Analysis Async Update program (SA130E) updates the Sales Analysis file (SA100M) and the Sales Summary file (SA120M) from the Sales History file (OP120M). Each valid sales history record is used to update sales statistics by period for both the current, and previous sales years on the corresponding sales analysis record. Once posted, the sales history record is updated to indicate that it has been processed.
If sales period 1 is being updated, the Sales Analysis file is read sequentially; and records meeting the deletion criteria are deleted. If a Sales Analysis record is not deleted, the sales statistics from the current periods are rolled into the previous year periods. The program performs the same function as SA100E running in demand post mode. However, this program runs asynchronously, processing new records as they arrive in the Sales History by Ship Date file (OP120ML6).