Documentation >
MAC-PAC Technical Library >
Manufacturing >
Shop Floor Control >
Programs >
Indirect Hours Summary Report - Purpose >
Indirect Hours Summary Report - Calculations
Indirect Hours Summary Report - Calculations
SF550E
A. Housekeeping
1. All work fields are defined and program constants are initialized.
2. The following records are retrieved from the System Control file (CT100M).
a. The company name record (COMNAM) is retrieved.
b. The date of the last audit trail purge is retrieved from the Shop Floor control record (SFCTL1). If it is not found, a default of all nines is used.
c. If either of the above records is not found, a message is sent to the system operator and processing continues.
3. The following information is retrieved from the Reference file (REFERP).
a. The date format is retrieved from category 049. If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.
b. The indirect hours codes and descriptions are retrieved from category 458 and loaded into arrays IHC and IHD respectively. These arrays are used to match the indirect hours code to its description.
B. Mainline
1. If no error has occurred in housekeeping, the Indirect Hours Summary Report Request transactions (type R30) are read sequentially from the report request file (SF520AL). If a file exception or record not found occurs, a message is printed and the program ends.
2. If a transaction of the correct type is found in the report request file, the request is read from the transaction file, processed, and deleted from the report request file when processing is complete. This continues until there are no more report request transactions of this type on the file.
3. In order for a transaction to be processed, it must be valid.
4. If a valid report request has been read, the Audit Trail file (SF550AL1/2) is read to retrieve any indirect hours transactions that relate to the current report request. If at this stage no records are found, a message is written to this effect, and the next report request is read.
5. Any audit trail records that exist for a given workcenter must, in order to be valid, have a posting date that is between (or equal to) the report period start and end dates (specified on the report request).
6. If a valid audit trail record was read, a check is performed for a workcenter break. If this has occurred, new workcenter headings are printed. Processing starts for the next workcenter (if ALL was selected), or the next report request is read (if one particular workcenter was selected).
7. Once an audit trail record has been validated, the indirect hours total for the code, machine, or employee is adjusted.
a. If the transaction is reversing previously entered data (Reversal Code = R), the Reference file (REFERP) on the transaction is subtracted from the total hours. Otherwise, the Indirect Hours amount is added to the total.
b. Totals are accumulated at the code, machine or employee, and workcenter levels, depending on the type of report request. When a new code or machine/employee is found, totals are printed for the previous code or machine/employee. The Indirect Hours Code Description is retrieved from the Reference file (REFERP) and printed. Totals are also printed at the workcenter level when a break occurs.
c. Overflow checking is performed on totals at all levels. If overflow occurs, a message to this effect is printed on the report.
8. If a report request exception occurs at any time, the Indirect Hours Summary Exception report is written. A warning message is printed on the report for any report request processed if an audit trail purge has taken place between the begin and end dates of that report request.