Documentation >
MAC-PAC Technical Library >
Manufacturing >
Just-in-Time >
Programs >
Production Schedule Maintenance Async - Purpose >
Production Schedule Maintenance Async - Calculations
Production Schedule Maintenance Async - Calculations
JT105E
A. Housekeeping
1. See the Common Processing Routines - Housekeeping section 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 plant on the Production Schedule workfile (JT100AP) is validated by chaining to the Warehouse Description logical file (IC170ML2). If the plant is valid, the associated calendar code is saved and processing continues.
4. The last date on the calendar file (associated with the plant's calendar code) Reference File category C14 is retrieved. If the record is not found the program terminates.
5. The following information is retrieved from the Reference file (REFERP).
a. The operating system's file status codes (category C15) is retrieved in order to retrieve and format all CPF status codes for input/output processing.
b. The date format (category 049) on the Reference file 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 size is retrieved from category 446. The quantity field sizes record is retrieved to determine the number of decimal positions for order quantity fields. If this record is not found the program terminates.
d. The order starting numbers (category C09) is used to retrieve the next available flow authorization number. If this record is not found, the program aborts.
e. The flow interval information (category C05) is used to determine the type of flow interval (weeks, months, or user-defined periods). All flow interval start dates are loaded into the Flow Interval Array (FIA). If this is not found, the program terminates.
6. The Calendar Date Array (ACAL) and the Shop Date Array (ASHP) are loaded from the Calendar file (CT140M).
7. This program is directed by the Production Schedule Maintenance Work file, which is written in the online program. Records are processed in plant/production center/part sequence.
B. Mainline
1. The Work file is used to retrieve the first record to be processed. Processing will continue until all records for a part have been processed. Records within a flow interval for a part are processed first before processing the next flow interval. Once all records for a part have been processed, the next part on the Work file (JT100AP) is processed in the same manner.
2. All supply records from the Flow Authorization file (JT100M) are processed by loading them into the Actual Supply Array (ASA). The flow authorization number and other related data are saved into the Actual Flow Authorization Data Structure (JTXACT). All supply records are processed for the current flow interval.
3. It is important that the user realize that flow authorizations and flow requirements are only modified if there is a change in quantity, revision level, status, or flow interval. Flows are not modified for a change in the product structure which do not have an associated revision level change. Some examples are deduct operation, scrap, quantity per, etc.
It is also important to realize that this program only processes the dates that have been paged to. It does not maintain a whole flow interval.
4. A Suggested Supply Array (SSA) is loaded with all supply records for the flow interval for a part using the Work file.
5. Once the Actual Supply Array and the Suggested Supply Array have been loaded with the appropriate values, suggested flow authorizations are created. If the supply quantity is zero, no flow authorization will be generated. If consecutive days have equal supply quantities, the flow authorization will be joined. Otherwise, if the supply quantities are different, the flow authorization will be broken. If the part's revision level changes, the flow authorization will also be broken. If F16 - Synchronize Flow was pressed in the online program, all FAs and FRs before today's date will be closed. If an FA or FR begins before today's date, but ends today or in the future, the FA or FR will be split and the remaining days will be re-added. The new suggested flow authorizations will be loaded into the suggested flow authorization data structure (RPXSUG).
6. Once processing is complete for the suggested flow authorizations, suggested flow supply records are implemented for the flow interval being processed. Suggested flow supply records for the part are compared to the existing flow supply records for the part. Identical records will remain, old records will be changed, and if the number of suggested flow supply records exceeds the number of existing flow supply records, new records will be added. Likewise, if the number of existing flow supply records exceed the number of suggested flow supply records, the remaining flow supply records will be deleted.
7. If a flow supply record needs to be added, the flow authorization record is added and assigned the next flow authorization number from the Reference file. The appropriate flow requirements must also be maintained for that record as follows:
a. The Product Structure file (DE120M) is used to retrieve component parts. Product structure information is saved into the product structure data structure (RPPSDS) if it is the first flow authorization to be exploded for the part. This saves inputs/outputs to the Product Structure and Part Master files when exploding other flow authorizations.
b. If the component is a build-through part, no flow requirement is generated for this component. When this situation arises, the explosion will continue for this build-through component, and its component will be retrieved. Once a non-build-through component is retrieved, flow requirements are generated for that component.
c. The flow requirement start and end dates are calculated by subtracting the product structure's component's offset days from the flow authorization start and end dates (FASDTE and FAEDTE).
d. A check is made to make sure that the part is effective between the flow authorization start and end dates. If it is not effective during that period, that component is not processed.
e. For processing where flow requirements are added, the following calculations occur: The daily or weekly required quantity for the component is calculated by multiplying the flow authorization quantity (FAQTY) by the quantity-per-parent-per-unit (QTYPER), which is calculated as the quantity-per-parent-per-batch (PZQTY) divided by the product structure batch quantity (PSBTQT). The required quantity for the component (FRRQTY) is also inflated by (divided by) the "yield factor" (WKNSCF), which is calculated as one minus the quantity derived from the product structure scrap factor (PSSCRF) divided by one hundred (100). The daily or weekly demand quantity (FRDQTY) takes into account the parent scrap factor (RPSCRP) by dividing the required quantity work field (WKQTYS) by the "yield factor" associated with the parent part (WRKF9). The demand quantity thus takes into account both components which are scrapped or fail to meet inspection, as well as the end item parents which are scrapped or fail to meet inspection after the manufacturing operations/processes.
f. For processing where flow requirements are changed (MNTTYP = CHANGE), the same calculations occur as above, but information such as component scrap factor (FRSCRF) and quantity-per-parent (FRQTYP) are retrieved from the flow requirements file (JT120M). The quantity-per-parent (FRQTYP) is not divided by the product structure batch quantity (PSBTQT) since it was written to the flow requirements file as a quantity-per-parent-per-unit.
g. The component flow requirement record is written to the Flow Requirements file (JT120M).
8. If a supply record needs to be changed, the flow authorization record is updated. The appropriate flow requirements for the flow authorization components must also be updated. In order to update flow requirements, the same calculations for an add need to be performed on a change.
9. If receipts exist for today and at the same time today's schedule is changed (WKHRCF = Y), the logic will be the same as when receipts exist for today and today's schedule is not changed (WKHRCF = 0) except the logic will allow today's schedule to be maintained. The FA covering today's date will be retrieved and will be split depending on its start and due dates.
a) A Set Lower Limit and Read equal to JT100L11 (keyed by plant/part/production center/revision level/start date) is executed to retrieve the FA covering today's date for the particular plant/part/production center/revision level combination. JT100L11 is defined as the input file.
b) If an FA covers today's date for a particular plant/part/production center/revision level:
1) If the start and end dates of the FA are equal, the FA is updated directly. The new FA quantity (FAQTY) is the sum of the entered schedule (TDYSCH) and the receipt quantity (FATQR).
2) If the start and end dates of the FA are not equal, the FA is split:
a) If today is the start date, the FA is split into two FAs: an FA covering only today's date and another FA covering the period after today. For today's FA, the new FA quantity is the sum of the entered schedule and the receipt quantity for today. The FA covering the period after today is updated with the revision level for tomorrow.
b) If today lies between the start date and the end date, the FA is split into three FAs: and FA covering the period until yesterday, an FA for today only, and another FA covering the period after today. For today's FA, the new FA quantity is the sum of the entered schedule and the receipt quantity for today. If an over-receipt was made before today, the receipt quantity is included in today's receipt quantity. The FA covering the period after today will be updated with the revision level for tomorrow.
c) If today is the end date, the FA is split into two FAs: an FA covering the period until yesterday and another FA covering today only. For today, the new FA quantity is the sum of the entered schedule and the receipt quantity for today. If an over-receipt was made before today, the receipt quantity is included in today's receipt quantity.
If no FA covers today's date for the revision level, the FA for the previous revision level covering today's date is retrieved. Splitting logic is the same as above.
10. If a supply record needs to be deleted, all flow requirements and the flow authorization are deleted.