Documentation >
MAC-PAC Technical Library >
Manufacturing >
Just-in-Time >
Programs >
Deduct Point Relief - Async - Purpose >
Deduct Point Relief - Async - Calculations
Deduct Point Relief - Async - Calculations
JT145E
A. Housekeeping
1. See the Common Processing Routines - Housekeeping section of this manual for a general discussion of this subroutine. Processing specific to this program is described below.
2. Parameter lists and key lists needed by the program are defined. Work fields and constants are defined and initialized.
3. The following information is retrieved from the Reference file (REFERP).
a. The operating system's file status codes (category 015) are retrieved. If the file access codes are not found, the program terminates.
b. The date format (category 049) is retrieved. If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.
c. The quantity field sizes (category 446) are retrieved. If they are not found, the program terminates.
B. Mainline
1. The transaction is retrieved from the Deduct Point Asynchronous Transaction file (JT140DP). If the record is not found, the program terminates.
2. The plant field on the transaction file is validated to not be blanks or nines, and be on the Warehouse Description logical file (IC170ML2). If the plant is found, the manufacturing company and warehouse associated with the plant are saved for further file accesses.
3. All fields are validated. This validation is similar to the validation performed in the Deduct Point Issues Data Entry program (JT140E). See the validation rules in the Just-in-Time User Manual. Additional validation is explained below.
a. Transaction date: If blank, it is formatted with today's date. For EDC transactions, a blank transaction date is invalid. If entered, it must be numeric and a valid date. If it is a valid date, it cannot be greater than today's date, since it is not possible to receive against production scheduled for the future.
b. Location: For parts whose relief type on the Part/Production Center Relationship file is point of use (JPRLFT = 1) and whose CONBON Control Code indicates use of one or both CONBON cards (JPCBCC = 1 or 2), either the relief location (JPRLOC) or the producing location (JPPLOC) must be entered on the Part/Production Center Relationship file. If the relief location exists on the file, it will be used as the issuing location, otherwise, the producing location will be used. If both of these fields are blank, the transaction is in error.
c. If the Lot Hold Flag is equal to 'Yes', a message will be displayed, indicating to the user the lot number is on hold.
4. If the transaction terminates before any of the deduct point issues for a part are processed, an UNSUCCESSFUL DEDUCT message is returned to either the workstation or the EDC message queue. If processing terminates after at least one flow requirement (FR) is processed (and before all FRs associated with the given deduct point operation are processed), a PARTIAL DEDUCT message is written to either the workstation's message queue or the EDC message queue. If the deduct is successfully processed, a SUCCESSFUL DEDUCT message is returned.
5. If the transaction is valid, it is processed. Using a flow authorization (FA) with the entered part, production center, and revision level, the first FR for that FA with the given deduct point operation number is retrieved. If no such FRs exist, the program ends and a warning message is written to the transaction error register.
6. The issue quantity (ISSQTY) is calculated by multiplying the deduct quantity (DDTQTY) by the quantity of component/parent (FRQTYP). This result is divided by the component yield factor (YLDFLT) which is calculated as the FR component scrap factor divided by one hundred and subtracted from one. This is done to inflate the issue to account for component scrap. The issue quantity is monitored for overflow. If overflow occurs, the transaction is rejected.
7. The Part/Production Center Relationship file is read to find the component part for the flow requirement. If the record is not found, the transaction is rejected. If the relief type of the parent part is point of production (JPRLFT = 2), the Issue Location field will be formatted from the component part master record. For an MRP part, the Issue Location field is formatted with the primary location (AMSKLC) on the Part Master file. For a JIT part, the Issue Location field is formatted with the producing location (JPPLOC) on the Part/Production Center Relationship file. If the component's relief type is point of use, the parent's relief location or parent's producing location (if the relief location is blank) is used as the issuing location. If the needed location is blank, the transaction is rejected and the program ends.
8. The master files are read and locked for update:
a. The Multiple Location file (IC130M) record is read for update and locked. If the multiple location record does not exist, a flag is set to format and add the record at update time and the Location Validation file (DE140M) is read and locked to keep another program from deleting the location before adding the multiple location record. If the location validation record does not exist, the transaction is rejected.
b. The record on the Warehouse Balance file (IC140M) is read for update and locked. If the record does not exist, the transaction is rejected.
c. The Part Master file (DE100M) is read for update. If the record does not exist, the transaction is rejected.
d. If any of the master files were not successfully locked, the ones that were locked are unlocked and the program terminates.
e. For non-stock parts, only the part master file (DE100M) is locked and read for update, since non-stock parts do not have multiple location (IC130M) or Warehouse Balance (IC140M) records. Non-stock parts are flagged for reanalysis/replanning on the part master file (DE100M).
f. If the Auto Lot Flag is equal to 'Yes', and the lot number on the screen is all blanks, a lot number is retrieved from the reference file off the next available lot number category Y34.
9. The new inventory balances are calculated. For the Multiple Location and Warehouse Balance files, the issue quantity (ISSQTY) is subtracted from the on-hand balance type or added for "produced components." (ISSQTY is negative for reversals.) If no overflow occurs, a critical message is written to the IC Transaction Register (IC505AP) and processing terminates. A message is written to the IC Transaction Register (IC505AP) if the balance fields are driven negative.
10. Other master file fields are then formatted.
a. On the Multiple Location file, the Date of Last Transaction field is formatted with the current system date. For non-reversal transactions, the activity since last count is incremented with the issue quantity. If overflow occurs, a critical message is written to the transaction error register. If a new record is being added to the file, the remaining fields are formatted with blanks and zeros.
b. On the Warehouse Balance file, the year-to-date activity is incremented with the issue quantity (for non-reversal transactions only). If overflow occurs, a critical message is written to the transaction error register. The work-in-process balance is also incremented with the issue quantity for both reversals and non-reversals (the issue quantity is negative for reversals). The date of last issue, date of last transaction, and last maintenance date are updated with the current system date, and the user ID is used to format the Last Maintenance Operator field.
c. On the Part Master file, the net change flag is set for reanalysis if it is not already set for replanning.
11. The master files are then updated in the reverse order in which they were read.
12. The Issues Transaction Register is written. If the transaction was successfully processed, the Issue Audit Trail is also written. Processing then continues with the next FR for the given FA and deduct point operation. If there are no more FRs, processing ends.
13. If the issues were successfully processed, a SUCCESSFUL DEDUCT ISSUE message is sent back either to the workstation that entered the transaction or to the EDC message queue (for EDC transactions).
14. If the issues were not processed successfully, the abort flag is formatted with YES and an UNSUCCESSFUL DEDUCT message (if no FRs for the deduct operation were processed), or a PARTIAL DEDUCT message (if at least one, but not all, FRs for the deduct operation were processed) is sent back to the workstation that entered the transaction or to the EDC message queue (for EDC transactions). If an error occurs while processing an EDC transaction, the EDC error flag is formatted with YES for both unsuccessful and partially successful transactions.