Program Description
End of Month Field Clearing can be found on the Accounts Receivable File Maintenance End of Month menu (AR-3-6-2). This is a required purge that is run with the AR/Billing End Of Month Procedures. The program updates numerous files by clearing out the month to date sales and cost figures. The month to date sales and cost figures are zeroed out in the Customer File (CUSTD). The month to date sales and cost figures are zeroed out in the Sales Rep/Service Tech File (SLMD). If it is the end of a quarter, the quarter to date Sales Rep figures are also zeroed out. The month to date sales and cost and unit sold figures are zeroed out in the Item and Item Warehouse Files (ITEM and ITEMWHD).
The program also updates or creates the Sales History by Item File (SAHIST.DT). The SAHIST File stores information by fiscal month. When the End of Month Field Clearing program is run, a fiscal month is entered. The SAHIST File is than updated for the inputted fiscal month. The information stored is the total sales and cost dollar amount, and units sold for each month for each item found in the ITEM File. The same information is also stored for each item found in the Item Warehouse (ITEMWHD) File. The End Of Month Field Clearing program transfers the sales and cost information to the SAHIST File prior to zeroing it out of the Item and Item Warehouse Files. At the end of the year, the End Of Year Field Clearing program is run. This transfers all 12 months of information found in the SAHIST file to last year fields in the SAHIST File. SAHIST stores the current and last year total sales, cost, and units sold per month per item and warehouse.
The End of Month Field Clearing program updates the existing SAHIST File if one already exists. If there is not an existing SAHIST File, one is created. Each item from the Item File and Item Warehouse File is checked to see if the month to date sales, cost, and units sold are zero in the Item File and Item Warehouse File. If they are all zero, the item is not searched for in the SAHIST File. If they are not all zero, the item is searched in the existing SAHIST File for a match on the product class and item number and warehouse. If one is found, the SAHIST record is updated for the fiscal month. If one is not found, an SAHIST File is created and than updated for the fiscal month. Upon creation of the SAHIST File, the current vendor number is also stored. The vendor number is not updated after the original creation. Because the program matches the product class if an item has a product class change and sales occur, a new SAHIST File is created for that product class. The other record remains but is no longer updated.
Modifications to the End Of Month Field Clearing program have been made in Revision 12:
The first is the adding of the printer choice selection screen. Prior to Rev 12 the program printed out an error log to the main printer. With Rev 12, you are now be able to select the printer that the error log prints to.
Additional information from the Item and Item Warehouse File will now be transferred to the SAHIST File. This occurs during the End Of Month Field Clearing program. This includes the current on hand, on order, allocated, and back ordered quantities from the Item File for warehouse 1 and the Item Warehouse File for all other warehouses. Also written to the SAHIST File is the current average and last cost and pack multiple from the Item File. Now you have the inventory status of an item per warehouse as it was at the end of a month, which is your ending for that month and your beginning for the next month. This greatly aids in finding any inventory discrepancies. Using these figures with the Inventory Transaction File (IMWACTD)and the Sales History File (SHHIST), you are able to track every movement of an item.
Also added to the SAHIST File at the time of creation is the system date. This is developed in future revs to delete records from the SAHIST File. At the present time, they are never deleted even when the Item File is deleted.
The first time the new fields are written into the SAHIST File is the first time End Of Month Field Clearing is run. That is the first fiscal month with the additional information. Months prior to that month do not have the new information. Sales history records added prior to loading Revision 12 do not have a date added. The program also creates new SAHIST records not only based on the month to date sales, cost, and unit sold figures not all being zero, but the quantities also not being all zero. The only items and item warehouses that do not have an SAHIST File are items that never have a dollar amount or unit sold or any quantities.
It is possible that the first time the End Of Month Field Clearing is run, there may be more new SAHIST Files created than normal. It may take longer the first time. This would mainly be items that were added to the Item and Item Warehouse File and never sold, but had quantities entered.
During the Revision 12 conversion program, the SAHIST File is expanded to allow the addition of the new information that is stored in the file. The existing SAHIST records have the new fields, but they are all zero. The Revision 12 conversion program also enlarges the SAHIST File so that the first time End Of Month Field Clearing is run after loading Rev 12, an end of file does not occur when adding any additional records to the SAHIST File.
Rev 14 Changes
Prior to Revision 14, if the program encountered an Item Warehouse record that had an invalid Item Number (not found in Item File), it would print on an error report “DO NOT CONTINUE ON WITH END OF MONTH PROCEDURES !! CALL LMS WITH ABOVE ERRORS”. It is not always necessary to stop the end of month procedures to resolve the problem. Many times, the correction can be made after end of month has been completed and operators have logged back on to the system. The error message has been changed to describe when the end of month procedures should be stopped while LMS Support corrects the problem and when the end of month procedures can be completed and LMS Support contacted after operators are back on the system. This is also true, if there is an error message regarding duplicate keys to SAHIST.IX and SAHIST1.IX.
See the report below for error messages. If an error message does occur, and you are unsure on how to proceed by reading the error message, stop your end of month until you contact LMS Support. They will be able to explain when it would be okay for you to continue on with your end of month and when it should be stopped for the next time this occurs.
